Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PayPal Payments Standard custom HTML form; How does PayPal know who is submitting?

Tags:

paypal

I'm trying to get this form to initiate a donation using PayPal Payments Standard...

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="cmd" value="_donations">
  <input type="text" name="amount"></input>
  <input type="hidden" name="item_name" value="OrganizationXYZ Donation">
  <input type="hidden" name="image_url" value="http://www.OrganizationXYZ.org/images/logo.gif">
  <input type="image" name="submit" border="0"  src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online">  
</form>

This seems like it should work according to PayPal's documentation, but it doesn't. Instead I get this error:

"We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com."

This error doesn't make any sense because you do not supply an email address in these forms. Yet it seems to me that my form needs to post some kind of identification- otherwise how would PayPal know which account is receiving the donation? Unless I register a domain vai my PayPal account settings, but there is no place to do that either.

Does anybody have experience with setting this up?

like image 850
Thomas Avatar asked May 31 '12 14:05

Thomas


People also ask

What is the difference between PayPal Pro and Standard?

The biggest difference (and benefit!) to using PayPal Pro is that you can customize the entire checkout experience, as customers remain on your site during the checkout process rather than being directed to PayPal to complete checkout or approve payments.

How do I accept PayPal payments on my website?

To use PayPal payment buttons on your website, you'll need to access your website's HTML and paste in a few lines of code. If you'd like to use PayPal Checkout, you can integrate it with your website or use an eCommerce partner like UEESHOP, Magento or Shopify. It's very easy to turn on.


2 Answers

Yes, as you mentioned, it need some sort of identifier of the recipient.
What you need to add is the 'business' parameter. That's all.

<input type="hidden" name="business" value="your secure merchant account ID / email here">
like image 108
Robert Avatar answered Oct 08 '22 21:10

Robert


You must to have a merchant account.

You can see a tutorial here:
http://kb.worldsecuresystems.com/833/cpsid_83331.html


try this code:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

    <select name="amount">
    <option value="3.99">6 Months ($3.99)</option>
    <option value="5.99">12 Months ($5.99)</option>

    </select>
    <br>
    <input name="currency_code" type="hidden" value="USD">
    <input name="shipping" type="hidden" value="0.00">
    <input name="tax" type="hidden" value="0.00">
    <input name="return" type="hidden" value="urlOnValidPayment">
    <input name="cancel_return" type="hidden" value="UrlOnCancelPayment">
    <input name="notify_url" type="hidden" value="URLForValidationPayement">
    <input name="cmd" type="hidden" value="_xclick">
    <input name="business" type="hidden" value="your e-mail">
    <input name="item_name" type="hidden" value="name of the object">
    <input name="no_note" type="hidden" value="1">
    <input type="hidden" name="no_shipping" value="1">
    <input name="lc" type="hidden" value="EN">
    <input name="bn" type="hidden" value="PP-BuyNowBF">
    <input name="custom" type="hidden" value="custom data">
    <input type="image" src="https://www.paypalobjects.com/en_US/CH/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
    </form>

for me it's work

like image 7
JMBise Avatar answered Oct 08 '22 22:10

JMBise