Note that there are some explanatory texts on larger screens.

plurals
  1. POPaypal PHP API integration
    primarykey
    data
    text
    <p>Recently I'm playing with paypal API PHP. </p> <p>I have downloaded a code from this url.</p> <p><a href="https://github.com/paypal/rest-api-curlsamples/blob/master/execute_all_calls.php" rel="nofollow noreferrer">https://github.com/paypal/rest-api-curlsamples/blob/master/execute_all_calls.php</a></p> <p>The code really works good with test creditcard(type:mastercard). The code looks like this</p> <pre><code> $url = $host.'/v1/payments/payment'; $payment = array( 'intent' =&gt; 'sale', 'payer' =&gt; array( 'payment_method' =&gt; 'credit_card', 'funding_instruments' =&gt; array ( array( 'credit_card' =&gt; array ( 'number' =&gt; '540xxxxxxxxxxxx6', 'type' =&gt; 'mastercard', 'expire_month' =&gt; 12, 'expire_year' =&gt; 2018, 'cvv2' =&gt; 111, 'first_name' =&gt; 'First Name', 'last_name' =&gt; 'Last Name' ) )) ), 'transactions' =&gt; array (array( 'amount' =&gt; array( 'total' =&gt; '2', 'currency' =&gt; 'USD' ), 'description' =&gt; 'payment by a credit card using a test script' )) ); </code></pre> <p>Now if i try to use the same code to make the payment using my VISA(American Express) with test card number 37xxxxxxxxxx005, how shall i obtain this? What are the parameters to be altered? </p> <p>In other words I would like to make the payment using Diner's Club,Discover and JCB. How shall I achieve this?</p> <p>Edit: I have got two comments from Stack Overflow users, and you can check it at the bottom of my question. I'm not clear with the comments. Do they tell that I don't need to think about the parameters and paypal will take care of the card details and make the transaction?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload