diff --git a/lib/PayPal/Api/FundingInstrument.php b/lib/PayPal/Api/FundingInstrument.php index b898a248..8fbe0ac5 100644 --- a/lib/PayPal/Api/FundingInstrument.php +++ b/lib/PayPal/Api/FundingInstrument.php @@ -21,7 +21,6 @@ class FundingInstrument extends PayPalModel * Credit Card instrument. * * @param \PayPal\Api\CreditCard $credit_card - * @deprecated Please use #setPaymentCard instead * * @return $this */ @@ -35,7 +34,6 @@ public function setCreditCard($credit_card) * Credit Card instrument. * * @return \PayPal\Api\CreditCard - * @deprecated Please use #setPaymentCard instead * */ public function getCreditCard() diff --git a/sample/billing/CreateBillingAgreementWithCreditCard.php b/sample/billing/CreateBillingAgreementWithCreditCard.php index 935cb287..0eadee1a 100644 --- a/sample/billing/CreateBillingAgreementWithCreditCard.php +++ b/sample/billing/CreateBillingAgreementWithCreditCard.php @@ -12,10 +12,10 @@ $createdPlan = require 'UpdatePlan.php'; use PayPal\Api\Agreement; +use PayPal\Api\CreditCard; use PayPal\Api\FundingInstrument; use PayPal\Api\Payer; use PayPal\Api\PayerInfo; -use PayPal\Api\PaymentCard; use PayPal\Api\Plan; use PayPal\Api\ShippingAddress; @@ -70,15 +70,15 @@ ->setPayerInfo(new PayerInfo(array('email' => 'jaypatel512-facilitator@hotmail.com'))); // Add Credit Card to Funding Instruments -$paymentCard = new PaymentCard(); -$paymentCard->setType('visa') +$card = new CreditCard(); +$card->setType('visa') ->setNumber('4491759698858890') ->setExpireMonth('12') ->setExpireYear('2017') ->setCvv2('128'); $fundingInstrument = new FundingInstrument(); -$fundingInstrument->setPaymentCard($paymentCard); +$fundingInstrument->setCreditCard($card); $payer->setFundingInstruments(array($fundingInstrument)); //Add Payer to Agreement $agreement->setPayer($payer); diff --git a/sample/doc/billing/CreateBillingAgreementWithCreditCard.html b/sample/doc/billing/CreateBillingAgreementWithCreditCard.html index c9e52a62..e833cd26 100644 --- a/sample/doc/billing/CreateBillingAgreementWithCreditCard.html +++ b/sample/doc/billing/CreateBillingAgreementWithCreditCard.html @@ -6,6 +6,7 @@ $createdPlan = require 'UpdatePlan.php'; use PayPal\Api\Agreement; +use PayPal\Api\CreditCard; use PayPal\Api\FundingInstrument; use PayPal\Api\Payer; use PayPal\Api\PayerInfo; @@ -55,15 +56,15 @@ $plan->setId($createdPlan->getId()); $agreement->setPlan($plan);
Add Credit Card to Funding Instruments
Add Credit Card to Funding Instruments
Add Shipping Address
A resource representing a Payer's funding instrument. For direct credit card payments, set the CreditCard field on this object.
Add Payer