setType("visa"); $card->setNumber("4417119669820331"); $card->setExpire_month("11"); $card->setExpire_year("2019"); $card->setCvv2("012"); $card->setFirst_name("Joe"); $card->setLast_name("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 the future payments. // (See bootstrap.php for more on `ApiContext`) try { $card->create($apiContext); } catch (\PPConnectionException $ex) { echo "Exception:" . $ex->getMessage() . PHP_EOL; var_dump($ex->getData()); exit(1); } ?>
Saved a new credit card with id: getId();?>
Back