Skip to content

issacting93/reaction-paypal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reaction-paypal

Meteor/Reaction Package for Paypal integration, installed by default with core packages.

Usage

mrt add reaction-
paypal

Configuration

In settings/settings.json file, or via dashboard configuration:

  "paypal": {
    "mode:" false, //true is live
    "client_id": "<your paypal client id>",
    "client_secret": "<your paypal client secret>"
  }

This overrides the dummy fixture data in common/collections.coffee

  Meteor.settings.paypal =
    mode: false
    client_id: ""
    client_secret: ""

Use

Format is Meteor.Paypal.*transaction_type*({ {/*card data*/}, {/*transaction data*/}, function(err, res){...})

  Meteor.Paypal.authorize({
      name: 'Buster Bluth',
      number: '4111111111111111',
      cvv2: '123',
      expire_year: '2015',
      expire_month: '01'
    },
    {
      total: '100.10',
      currency: 'USD'
    },
    function(error, results){
      if(error)
        //Deal with Error
      else
        //results contains boolean for saved
        // and a payment object with information about the transaction
    });

For information on the payment object returned see Paypal's Payment Option Documentation

Thanks to, and much borrowed from David Brear's meteor-paypal

About

Paypal payment module for Reaction

Resources

License

Stars

Watchers

Forks

Packages

No packages published