setType("visa") ->setNumber("4417119669820331") ->setExpireMonth("11") ->setExpireYear("2019") ->setCvv2("012") ->setFirstName("Joe") ->setLastName("Shopper"); // ### Save card // Creates the credit card as a resource // in the PayPal vault. The response contains // an 'id' that you can use to refer to it // in future payments. // (See bootstrap.php for more on `ApiContext`) try { $card->create($apiContext); } catch (PayPal\Exception\PPConnectionException $ex) { echo "Exception:" . $ex->getMessage() . PHP_EOL; var_dump($ex->getData()); exit(1); } ?> Save a credit card
Saved a new credit card with id: getId();?>
toJSON(128);?>
Back