Skip to content

Commit

Permalink
Add backward compatibility for Paypal.pay().
Browse files Browse the repository at this point in the history
  • Loading branch information
petersirka committed Sep 13, 2015
1 parent 2f3b686 commit 7fcd0e8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Expand Up @@ -77,6 +77,12 @@ Paypal.prototype.detail = function(token, payer, callback) {

Paypal.prototype.pay = function(invoiceNumber, amount, description, currency, requireAddress, callback) {

// Backward compatibility
if (typeof(requireAddress) === 'function') {
callback = requireAddress;
requireAddress = false;
}

var self = this;
var params = self.params();

Expand Down

0 comments on commit 7fcd0e8

Please sign in to comment.