forked from LiveCarta/PayPal-PHP-SDK
Minor text changes in sample code comments
This commit is contained in:
@@ -81,8 +81,8 @@ $payment->setIntent("sale")
|
||||
->setTransactions(array($transaction));
|
||||
|
||||
// ### Create Payment
|
||||
// Create a payment by posting to the APIService
|
||||
// using a valid ApiContext (See bootstrap.php for more on `ApiContext`)
|
||||
// Create a payment by calling the payment->create() method
|
||||
// with a valid ApiContext (See bootstrap.php for more on `ApiContext`)
|
||||
// The return object contains the state.
|
||||
try {
|
||||
$payment->create($apiContext);
|
||||
|
||||
@@ -60,8 +60,8 @@ the above types and intent set to sale 'sale'</p></div></div><div class="code"><
|
||||
<span class="o">-></span><span class="na">setPayer</span><span class="p">(</span><span class="nv">$payer</span><span class="p">)</span>
|
||||
<span class="o">-></span><span class="na">setTransactions</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="nv">$transaction</span><span class="p">));</span></div></div></div><div class="segment"><div class="comments"><div class="wrapper"><h3 id="create-payment">Create Payment</h3>
|
||||
|
||||
<p>Create a payment by posting to the APIService
|
||||
using a valid ApiContext (See bootstrap.php for more on <code>ApiContext</code>)
|
||||
<p>Create a payment by calling the payment->create() method
|
||||
with a valid ApiContext (See bootstrap.php for more on <code>ApiContext</code>)
|
||||
The return object contains the state.</p></div></div><div class="code"><div class="wrapper"><span class="k">try</span> <span class="p">{</span>
|
||||
<span class="nv">$payment</span><span class="o">-></span><span class="na">create</span><span class="p">(</span><span class="nv">$apiContext</span><span class="p">);</span>
|
||||
<span class="p">}</span> <span class="k">catch</span> <span class="p">(</span><span class="nx">PayPal\Exception\PPConnectionException</span> <span class="nv">$ex</span><span class="p">)</span> <span class="p">{</span>
|
||||
@@ -82,4 +82,4 @@ The return object contains the state.</p></div></div><div class="code"><div clas
|
||||
<span class="x"> <pre></span><span class="cp"><?php</span> <span class="nb">var_dump</span><span class="p">(</span><span class="nv">$payment</span><span class="o">-></span><span class="na">toArray</span><span class="p">());</span><span class="cp">?></span><span class="x"></pre></span>
|
||||
<span class="x"> <a href='../index.html'>Back</a></span>
|
||||
<span class="x"></body></span>
|
||||
<span class="x"></html></span></div></div></div></div></body></html>
|
||||
<span class="x"></html></span></div></div></div></div></body></html>
|
||||
|
||||
@@ -31,7 +31,7 @@ an 'id' that you can use to refer to it later.
|
||||
|
||||
<span class="k">try</span> <span class="p">{</span></div></div></div><div class="segment"><div class="comments"><div class="wrapper"><h3 id="delete-card">Delete Card</h3>
|
||||
|
||||
<p>deletes saved credit card
|
||||
<p>Lookup and delete a saved credit card.
|
||||
(See bootstrap.php for more on <code>ApiContext</code>)</p></div></div><div class="code"><div class="wrapper"> <span class="nv">$creditCard</span> <span class="o">=</span> <span class="nx">CreditCard</span><span class="o">::</span><span class="na">get</span><span class="p">(</span><span class="nv">$card</span><span class="o">-></span><span class="na">getId</span><span class="p">(),</span> <span class="nv">$apiContext</span><span class="p">);</span>
|
||||
<span class="nv">$creditCard</span><span class="o">-></span><span class="na">delete</span><span class="p">(</span><span class="nv">$apiContext</span><span class="p">);</span>
|
||||
<span class="p">}</span> <span class="k">catch</span> <span class="p">(</span><span class="nx">PayPal\Exception\PPConnectionException</span> <span class="nv">$ex</span><span class="p">)</span> <span class="p">{</span>
|
||||
@@ -47,4 +47,4 @@ an 'id' that you can use to refer to it later.
|
||||
<span class="x"> <p> Credit Card deleted Successfully</p></span>
|
||||
<span class="x"> <a href='../index.html'>Back</a></span>
|
||||
<span class="x"></body></span>
|
||||
<span class="x"></html></span></div></div></div></div></body></html>
|
||||
<span class="x"></html></span></div></div></div></div></body></html>
|
||||
|
||||
@@ -36,7 +36,7 @@ try {
|
||||
|
||||
try {
|
||||
// ### Delete Card
|
||||
// deletes saved credit card
|
||||
// Lookup and delete a saved credit card.
|
||||
// (See bootstrap.php for more on `ApiContext`)
|
||||
|
||||
$creditCard = CreditCard::get($card->getId(), $apiContext);
|
||||
|
||||
Reference in New Issue
Block a user