From 08e39b28a0f1e0d6b1518d00337a91fb18a78927 Mon Sep 17 00:00:00 2001 From: Andrew Angell Date: Sat, 6 Dec 2014 05:59:50 -0600 Subject: [PATCH 1/2] Adds PayPal Partner Code --- Lib/Paypal.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Lib/Paypal.php b/Lib/Paypal.php index 9ad31f9..edbfafd 100644 --- a/Lib/Paypal.php +++ b/Lib/Paypal.php @@ -54,6 +54,11 @@ class Paypal { */ protected $nvpSignature = null; +/** + * Partner Code - buttonsource + */ + protected $nvpButtonsource = null; + /** * API credentials - nvp token */ @@ -336,6 +341,7 @@ public function getExpressCheckoutDetails($token) { 'USER' => $this->nvpUsername, 'PWD' => $this->nvpPassword, 'SIGNATURE' => $this->nvpSignature, + 'BUTTONSOURCE' => $this->nvpButtonsource, ); // HttpSocket if (!$this->HttpSocket) { @@ -747,6 +753,7 @@ public function formatDoDirectPaymentNvps($payment) { 'USER' => $this->nvpUsername, 'PWD' => $this->nvpPassword, 'SIGNATURE' => $this->nvpSignature, + 'BUTTONSOURCE' => $this->nvpButtonsource, 'IPADDRESS' => $ipAddress, // Required 'AMT' => $payment['amount'], // The total cost of the transaction 'CURRENCYCODE' => 'GBP', // A 3-character currency code @@ -789,6 +796,7 @@ public function buildExpressCheckoutNvp($order) { 'USER' => $this->nvpUsername, 'PWD' => $this->nvpPassword, 'SIGNATURE' => $this->nvpSignature, + 'BUTTONSOURCE' => $this->nvpButtonsource, 'RETURNURL' => $order['return'], 'CANCELURL' => $order['cancel'], 'PAYMENTREQUEST_0_CURRENCYCODE' => $order['currency'], @@ -883,6 +891,7 @@ public function formatRefundTransactionNvps($refund) { 'USER' => $this->nvpUsername, 'PWD' => $this->nvpPassword, 'SIGNATURE' => $this->nvpSignature, + 'BUTTONSOURCE' => $this->nvpButtonsource, 'TRANSACTIONID' => $refund['transactionId'], // The orginal PayPal Transaction ID 'INVOICEID' => $reference, // Your own reference or invoice number 'REFUNDTYPE' => $refund['type'], // Full, Partial, ExternalDispute, Other From 9b9c14e50bbfb28616e40e40a338e7c756dc3555 Mon Sep 17 00:00:00 2001 From: Andrew Angell Date: Sat, 6 Dec 2014 05:59:50 -0600 Subject: [PATCH 2/2] Adds PayPal Partner Code --- Lib/Paypal.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Lib/Paypal.php b/Lib/Paypal.php index 9ad31f9..cbeb4ec 100644 --- a/Lib/Paypal.php +++ b/Lib/Paypal.php @@ -54,6 +54,11 @@ class Paypal { */ protected $nvpSignature = null; +/** + * Partner Code - buttonsource + */ + protected $nvpButtonsource = 'AngellEYE_SP_RobMcvey_CakePHP'; + /** * API credentials - nvp token */ @@ -336,6 +341,7 @@ public function getExpressCheckoutDetails($token) { 'USER' => $this->nvpUsername, 'PWD' => $this->nvpPassword, 'SIGNATURE' => $this->nvpSignature, + 'BUTTONSOURCE' => $this->nvpButtonsource, ); // HttpSocket if (!$this->HttpSocket) { @@ -747,6 +753,7 @@ public function formatDoDirectPaymentNvps($payment) { 'USER' => $this->nvpUsername, 'PWD' => $this->nvpPassword, 'SIGNATURE' => $this->nvpSignature, + 'BUTTONSOURCE' => $this->nvpButtonsource, 'IPADDRESS' => $ipAddress, // Required 'AMT' => $payment['amount'], // The total cost of the transaction 'CURRENCYCODE' => 'GBP', // A 3-character currency code @@ -789,6 +796,7 @@ public function buildExpressCheckoutNvp($order) { 'USER' => $this->nvpUsername, 'PWD' => $this->nvpPassword, 'SIGNATURE' => $this->nvpSignature, + 'BUTTONSOURCE' => $this->nvpButtonsource, 'RETURNURL' => $order['return'], 'CANCELURL' => $order['cancel'], 'PAYMENTREQUEST_0_CURRENCYCODE' => $order['currency'], @@ -883,6 +891,7 @@ public function formatRefundTransactionNvps($refund) { 'USER' => $this->nvpUsername, 'PWD' => $this->nvpPassword, 'SIGNATURE' => $this->nvpSignature, + 'BUTTONSOURCE' => $this->nvpButtonsource, 'TRANSACTIONID' => $refund['transactionId'], // The orginal PayPal Transaction ID 'INVOICEID' => $reference, // Your own reference or invoice number 'REFUNDTYPE' => $refund['type'], // Full, Partial, ExternalDispute, Other