forked from LiveCarta/PayPal-PHP-SDK
Updating sample comments
This commit is contained in:
@@ -1,23 +1,18 @@
|
||||
<?php
|
||||
|
||||
// # Create Credit Card Sample
|
||||
// Using the 'vault' API, you can store a
|
||||
// Credit Card securely on PayPal. You can
|
||||
// use a saved Credit Card to process
|
||||
// a payment in the future.
|
||||
// The following code demonstrates how
|
||||
// can save a Credit Card on PayPal using
|
||||
// the Vault API.
|
||||
// You can store credit card details securely
|
||||
// with PayPal. You can then use the returned
|
||||
// Credit card id to process future payments.
|
||||
// API used: POST /v1/vault/credit-card
|
||||
|
||||
|
||||
require __DIR__ . '/../bootstrap.php';
|
||||
use PayPal\Api\CreditCard;
|
||||
use PayPal\Api\Address;
|
||||
|
||||
// ### CreditCard
|
||||
// A resource representing a credit card that can be
|
||||
// used to fund a payment.
|
||||
// A resource representing a credit card that is
|
||||
// to be stored with PayPal.
|
||||
$card = new CreditCard();
|
||||
$card->setType("visa")
|
||||
->setNumber("4417119669820331")
|
||||
@@ -42,6 +37,9 @@ try {
|
||||
}
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Save a credit card</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>Saved a new credit card with id: <?php echo $card->getId();?></div>
|
||||
<pre><?php var_dump($card);?></pre>
|
||||
|
||||
Reference in New Issue
Block a user