forked from LiveCarta/PayPal-PHP-SDK
Changing test case and samples to use newer camelcase setters
This commit is contained in:
@@ -21,11 +21,11 @@ use PayPal\Api\Address;
|
||||
$card = new CreditCard();
|
||||
$card->setType("visa");
|
||||
$card->setNumber("4417119669820331");
|
||||
$card->setExpire_month("11");
|
||||
$card->setExpire_year("2019");
|
||||
$card->setExpireMonth("11");
|
||||
$card->setExpireYear("2019");
|
||||
$card->setCvv2("012");
|
||||
$card->setFirst_name("Joe");
|
||||
$card->setLast_name("Shopper");
|
||||
$card->setFirstName("Joe");
|
||||
$card->setLastName("Shopper");
|
||||
|
||||
// ### Save card
|
||||
// Creates the credit card as a resource
|
||||
@@ -35,7 +35,7 @@ $card->setLast_name("Shopper");
|
||||
// (See bootstrap.php for more on `ApiContext`)
|
||||
try {
|
||||
$card->create($apiContext);
|
||||
} catch (\PPConnectionException $ex) {
|
||||
} catch (PayPal\Exception\PPConnectionException $ex) {
|
||||
echo "Exception:" . $ex->getMessage() . PHP_EOL;
|
||||
var_dump($ex->getData());
|
||||
exit(1);
|
||||
@@ -47,4 +47,4 @@ try {
|
||||
<pre><?php var_dump($card);?></pre>
|
||||
<a href='../index.html'>Back</a>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user