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

@@ -10,19 +10,19 @@
require __DIR__ . '/../bootstrap.php';
use PayPal\Api\Amount;
use PayPal\Api\CreditCard;
use PayPal\Api\Details;
use PayPal\Api\FundingInstrument;
use PayPal\Api\Item;
use PayPal\Api\ItemList;
use PayPal\Api\Payer;
use PayPal\Api\Payment;
use PayPal\Api\PaymentCard;
use PayPal\Api\Transaction;
// ### CreditCard
// A resource representing a credit card that can be
// ### PaymentCard
// A resource representing a payment card that can be
// used to fund a payment.
$card = new CreditCard();
$card = new PaymentCard();
$card->setType("visa")
->setNumber("4669424246660779")
->setExpireMonth("11")
@@ -36,7 +36,7 @@ $card->setType("visa")
// For direct credit card payments, set the CreditCard
// field on this object.
$fi = new FundingInstrument();
$fi->setCreditCard($card);
$fi->setPaymentCard($card);
// ### Payer
// A resource representing a Payer that funds a payment