Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To do what you're talking about, first you need to post a form to paypal. This pseudocode should help.</p> <pre><code>&lt;form action='https://www.paypal.com/cgi-bin/webscr' method='post'&gt; &lt;input type='hidden' name='cmd' value='_cart' /&gt; &lt;input type='hidden' name='upload' value='1' /&gt; &lt;input type='hidden' name='business' value='{$paypal_email}' /&gt; &lt;input type='hidden' name='shopping_url' value='{$return_path}' /&gt; &lt;input type='hidden' name='currency_code' value='USD' /&gt; (for each item in the cart, repeat...) &lt;input type='hidden' name='item_number_{$one_based_counter}' value='{$item_number}'&gt; &lt;input type='hidden' name='item_name_{$one_based_counter}' value='{$item_name}'&gt; &lt;input type='hidden' name='amount_{$one_based_counter}' value='{$amount}'&gt; &lt;input type='hidden' name='quantity_{$one_based_counter}' value='{$quantity}'&gt; (for each custom field for this item (e.g. size, style)) &lt;input type='hidden' name='on{$zero_based_counter}_{$one_based_counter}' value='{$custom_field_name[$zero_based_counter]}'&gt; &lt;input type='hidden' name='os{$zero_based_counter}_{$one_based_counter}' value='{$custom_field_value[$zero_based_counter]}'&gt; (end for each) (end for each) &lt;input type='submit' value='Pay Me' /&gt;&lt;/form&gt; </code></pre> <p>After that, you need to write another script to handle payment notifications from PayPal. Look into PayPal's Instant Payment Notification (IPN). Log in to PayPal and have IPN post to your notification handler script. There are some pretty good IPN tutorials on PayPal's site and elsewhere.</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