Use PaymentCard instead of CreditCard

- Fixed deprecation messages.
- Fixes #639.
- Fixes #648.
- Updated Samples.
This commit is contained in:
Jay Patel
2016-10-17 17:12:07 -05:00
parent 3f98d9f182
commit ae31151ba3
7 changed files with 29 additions and 28 deletions

View File

@@ -8,10 +8,10 @@ require __DIR__ . '/../bootstrap.php';
use PayPal\Api\Address;
use PayPal\Api\Amount;
use PayPal\Api\CreditCard;
use PayPal\Api\FundingInstrument;
use PayPal\Api\Payer;
use PayPal\Api\Payment;
use PayPal\Api\PaymentCard;
use PayPal\Api\Transaction;
// The biggest difference between creating a payment, and authorizing a payment is to set the intent of payment
@@ -25,8 +25,8 @@ $addr->setLine1("3909 Witmer Road")
->setCountryCode("US")
->setPhone("716-298-1822");
$card = new CreditCard();
$card->setType("visa")
$paymentCard = new PaymentCard();
$paymentCard->setType("visa")
->setNumber("4417119669820331")
->setExpireMonth("11")
->setExpireYear("2019")
@@ -36,7 +36,7 @@ $card->setType("visa")
->setBillingAddress($addr);
$fi = new FundingInstrument();
$fi->setCreditCard($card);
$fi->setPaymentCard($paymentCard);
$payer = new Payer();
$payer->setPaymentMethod("credit_card")