Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This might be a little late for you sorry, but just in case - I currently use "currencyCode" = > "AUD" and it is working in the sandbox.</p> <p>There's a full list of the currency codes available at <a href="https://www.paypal.com/cgi-bin/webscr?cmd=p/sell/mc/mc_wa-outside" rel="nofollow">PayPal</a></p> <p>For yours, I'm guessing it would be:</p> <pre><code>$p-&gt;add_field('currencyCode', 'GBP'); </code></pre> <p>As for your question about the IPN itself, it looks like you're on the right track. It will depend on the data you're getting back and whether you're interested in the individual transactions (if using adaptive payments) or if you're reversing them all on error etc. The easiest way to determine what you'll need to do is to simply display or log all the post data so you can see how it's constructed.</p> <p>You'll also need to set it up so that the script is accessible by PayPal. You'll then pass the full URL of this script to the "notify_url" parameter and send it off to PayPal. Once the payment has completed PayPal will send a bunch of information to your script so that you can process it.</p> <p>Unfortunately I'm not from a PHP background so I can't give you the exact code you'll need. Also note that there are a lot of security issues that you'll want to look into before going to a production environment. Not sure if you already intend to do this with that validateIPN function, but you need to ensure that you can tell whether it comes from PayPal and not a malicious user. One way would be to pass a value using the custom attribute and have PayPal pass this back to you, however you'd be much better off using the API certificates etc.</p> <p>If you haven't already, it may be worth checking out a few of the <a href="https://www.x.com/developers/paypal/documentation-tools/paypal-code-samples" rel="nofollow">sample applications</a> PayPal has done up, there seem to be quite a few PHP ones. </p> <p>Let me know if you need anything else,</p>
 

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