Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You may want to use the new PayPal SDK. They have a good set of sample code, including code for express checkout and IPN. Try here <a href="https://www.x.com/developers/paypal/documentation-tools/paypal-sdk-index" rel="nofollow">https://www.x.com/developers/paypal/documentation-tools/paypal-sdk-index</a> Get the SDK for Express checkout. At this time, they should be at SDK 98 for PHP.</p> <p>You won't have to worry about the Curl, the SDK takes care of all that for you. A typical call might be something like this.</p> <pre><code>$setECResponse = $paypalService-&gt;SetExpressCheckout($setECReq); </code></pre> <p>This line of code is modeled after the samples. It's all object oriented. They provide you with classes. In this case there is a request object you fill out, the examples show exactly how to do it; just use the samples as your template.</p> <p>It sounds like you want to do PayPal Express checkout, this way you won't have to handle credit cards or anything like that. The user is redirected to the PayPal website and all the financial transactions happen there. The user is redirected back to your site. Then you have a page where the user can review the order and click submit if they approve. When the user clicks submit, you call a PayPal API telling PayPal that the transaction is approved. PayPal then executes the transaction and sends you back a confirmation with a transaction id. You can then call getTransactionDetails and display the confirmation to the customer. You can additionally put those transaction details into a database.</p> <p>Here are the APIs you can call for this. These are modeled closely to the sample code they provide </p> <pre><code>$paypalService-&gt;SetExpressCheckout($setECReq); </code></pre> <p>control goes to PayPal URL, and the user goes through a few pages there. control returns to you.</p> <p>your order review page $paypalService->GetExpressCheckoutDetails($getExpressCheckoutReq);</p> <p>your order confirmation page</p> <pre><code>$paypalService-&gt;GetExpressCheckoutDetails($getECReq); $paypalService-&gt;DoExpressCheckoutPayment($DoECReq); </code></pre> <p>Tells PayPal to do the transaction. </p> <pre><code>$paypalService-&gt;GetTransactionDetails($request); </code></pre> <p>Here you can put transaction details into a database. You can also send yourself a mail with all the details, that way you will know whenever a transaction occurs.</p> <p>IPN can be a bit tricky. There is a sample IPN listener that they provide, that will help. You will need to set up your listener URL on the PayPal website. You will also need to set up an SSL certificate.</p> <p>The SDKs are fairly new, but PayPal is working on an even newer way to do things, developer.paypal.com. It just came out within the last month or so. You may want to look into that too. </p>
    singulars
    1. This table or related slice is empty.
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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