I'm having an issue with the paypal button code below not working when sent to a Hotmail address. It shows in the email source code and in the email message just fine. But when you click on it, it directs you to the paypal homepage.
This works fine in gmail and yahoo mail emails, but not Hotmail. The code below is what is used and how it appears in the emails.
Is there a reason why it's doing this, I can't find anything on it.
<form method="post" name="paypal_form" action="https://www.paypal.com/cgi-bin/webscr">
<input type="hidden" name="business" value="email#email.com"/>
<input type="hidden" name="invoice" value="NGQ2YWY1Nz000mZiYmEty1I2ZTMzZTcwOxxzMmI4Y="/>
<input type="hidden" name="item_name" value="Acme Company [testes]"/>
<input type="hidden" name="amount" value="4"/>
<input type="hidden" name="rm" value="2"/>
<input type="hidden" name="cmd" value="_xclick"/>
<input type="hidden" name="currency_code" value="USD"/>
<input type="hidden" name="notify_url" value="http://site.com/paypal.php?payment_status=ipn"/>
<input type="hidden" name="cancel_return" value="http://site.com/paypal.php?payment_status=cancel"/>
<input type="hidden" name="return" value="http://site.com/paypal.php?payment_status=success"/>
<input type="hidden" name="upload" value="0"/>
<input type="image" src="http://site.com/images/paypal_logo.png" width="197" height="48" class="paypal_button" name="submit" alt="Make payments with PayPal!" title="Make payments with PayPal!">
</form>
You should never use a <form> in emails -- never, ever. It cannot be trusted to work.
What is generating this <form> with POST variables for you, and why is it not using an <a> link with GET variables instead?
Related
I am trying to enable PayPal IPN on my website. I am now facing some issues with the tests environment - PayPal sandbox.
I am trying to integrate with PHP, so I am using the code of the file paypal_ipn.php from https://github.com/paypal/ipn-code-samples.
I have a test HTML page with which I send the POST actions to paypal_ipn.php:
<form target="_new" method="post" action="http://example.com/paypal_integration/paypal_ipn.php">
<input type="hidden" name="business" value="your#paypal_email.com">
<input type="hidden" name="item_name" value="product name">
<input type="hidden" name="amount" value="1" >
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="custom" value="CUSTOM_CODE_#...">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://example.com/paypal_integration/return.php">
<input type="hidden" name="cancel_return" value="http://example.com/paypal_integration/cancel_return.php">
<input type="hidden" name="cbt" value="description">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="notify_url" value="http://example.com/paypal_integration/paypal_ipn.php">
<input type="submit" value="submit!" />
</form>
The result is "INVALID". How do I go through this problem, in the sandbox environment and after that in live environment? I.e. how to get "VERIFIED" actions in sandbox?
I have solved this:
in paypal account go to https://developer.paypal.com/developer/ipnsimulator/ ;
after that, fill the form: in "transaction type" choose for instance "cart checkout";
in "IPN handler URL" put the link of the IPN receiver page: http://example.com/paypal_integration/paypal_ipn.php
or:
in paypal account, create test accounts: https://developer.paypal.com/developer/accounts ;
log-in with the facilitator account, and then create a test button as indicated here: https://developer.paypal.com/docs/classic/paypal-payments-standard/ht_test-pps-buttons/ (go to: https://www.sandbox.paypal.com/pt/cgi-bin/webscr?cmd=_button-designer );
use the button code, eg.: <input type="hidden" name="hosted_button_id" value="6RNT8A4HBBJRE">, in the button of the website and then simulate a purchase.
We integrated Paypal button to support our starting business. We received several user feedbacks about not being able to complete payment. They reported that they can see the payment page after clicking the Buy Now button. However they tried pay through Paypal account, pay with credit card and pay with Paypal credit. None of them work. However, no one in our team has faced such problem when checking out. So we really don't have an idea about what's going on. Here is an example Paypal button code we use:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="business#myticket.com">
<input type="hidden" name="env" value="www">
<input type="hidden" name="address_override" value="0">
<input type="hidden" name="item_name_1" value="演唱会">
<input type="hidden" name="amount_1" value="122">
<input type="hidden" name="discount_rate_1" value="10">
<input type="hidden" name="item_name_2" value="演唱会">
<input type="hidden" name="amount_2" value="122">
<input type="hidden" name="discount_rate_2" value="10">
<input type="hidden" name="shipping_1" value="$27.95">
<!-- Fill full name in the first_name field -->
<input type="hidden" name="first_name" value="Bruce Lee">
<input type="hidden" name="notify_url" value="https://www.myticket.com/payment/ipn">
<input type="hidden" name="address1" value="">
<input type="hidden" name="address2" value="">
<input type="hidden" name="city" value="">
<input type="hidden" name="state" value="">
<input type="hidden" name="zip" value="">
<input type="hidden" name="country" value="US">
<input type="hidden" name="email" value="">
<input type="hidden" name="custom" value="lmIvjDuZVRsCWFPDdfFsrKiNVrnAbWeTZSINiDuszZEGKjeXfhqxyqRrn">
<input type="hidden" name="paymentaction" value="authorization">
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="return" value="https://www.myticket.com">
<input type="hidden" name="cancel_return" value="https://www.myticket.com">
<input type="image" name="submit" border="0" src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-large.png" alt="Check out with PayPal">
</form>
Is there any problem with this Paypal button? If not, what else could be causing the payment to fail?
Besides, is there a way we can get a message about these failures? Right now we are using IPN. However IPN doesn't seem to notify us about these payment failures.
BTW, myticket.com is a fake url in this post.
Well first, when using Website Payments Standard buttons, you don't get much back as far as the declines. Typically you are only going to get details of declines back when you are using API calls to process the payment. As for the button itself, it looks fine to me. Perhaps some of the issue is with the special characters for the item name which is leading to the failure. You could try creating 2 of the same buttons/items but without the special characters and see if those same buyers run into the issue with the second button that they did with the first one. You could also try using the "lc" variable in your button code to see if this helps. You can see the description of what the "lc" variable does here.
I am trying to send POST vars to paypal ipn like that:
<form class="form-horizontal paypal-button" method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr" target="_top" style="opacity: 1;">
<input type="hidden" name="button" value="buynow">
<input type="hidden" name="business" value="vendedor#estadosbinarios.com">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="shipping" value="0">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="notify_url" value="http://www.estadosbinarios.com/pagos/paypal_ipn.php">
<input type="hidden" name="return" value="http://www.estadosbinarios.com/pagos/success.php">
<input type="hidden" name="env" value="www.sandbox">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="bn" value="JavaScriptButton_buynow">
<!-- Enable override of buyers’s address stored with PayPal . -->
<input type="hidden" name="address_override" value="1">
<input id="nombre" name="first_name" type="text" placeholder="" class="form-control input-md">
<input id="nombre" name="last_name" type="text" placeholder="" class="form-control input-md">
</form>
But Paypal doesn´t care my vars first_name or last_name, paypal is always getting the vars from user account of paypal and overwriting that var.
Is there any way to choose my vars?
When people pay with PayPal through it is indeed going to use the info provided from the shipping address of their account. You can't get around this with Payments Standard like you're using.
You could switch to the Express Checkout API which would give you the option of collecting the buyers name, address, etc. and then passing that over to PayPal in a way that cannot be overridden. This way you'd get whatever they typed into your site instead of relying on PayPal to provide those details.
I'm trying to integrate Paypal payments on website and I got this form:
<form method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr" id="paypal_form">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="mail#mail.com" />
<input type="hidden" name="item_name" value="Test payment" />
<input type="hidden" name="item_number" value="777" />
<input type="hidden" name="amount" value="1.99" />
<input type="hidden" name="return" value="http://myhost.com//successpaypal.php" />
<input type="hidden" name="cancel_return" value="http://myhost.com/cancelpaypal.php" />
<input type="hidden" name="no_shipping" value="0" />
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="currency_code" value="USD" />
<input type="submit" value="Go to PayPal" />
</form>
And payments goes fine until users needs to confirm payment. There is no e-mail sending. I was trying in the sandbox with couple e-mail from couple computers and a couple of days. Is there any way to remove confirmation of payment by e-mail or what can be wrong with my that form?
The sandbox environment doesn't send emails externally. Since anyone can open (and confirm) any email address on any account in sandbox, it would be total chaos.
Instead, you can find all relevant messages that otherwise would've been sent as emails under 'Dashboard' > 'Sandbox notifications' on https://developer.paypal.com/
I have the following payment form:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="online-store-paypal">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="kae#kvsites.ie">
<input type="hidden" name="item_name" value="Purchase made from www.kvsites.ie">
<input type="hidden" name="item_number" value="6">
<input type="hidden" name="amount" value="1.00">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="no_note" value="1">
<input type="hidden" value="http://www.kvsites.ie/contact-us/Login?onlinestore_iid=6" name="return">
<input type="hidden" name="notify_url" value="http://www.kvsites.ie/ww.plugins/online-store/verify/paypal.php">
<input type="hidden" name="bn" value="IC_Sample">
<input type="image" style="width:68px;height:23px;" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" name="submit" alt="Make payments with payPal - it's fast, free and secure!">
<img width="1" height="1" alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif">
</form>
The relevant line is this:
<input type="hidden" name="notify_url" value="http://www.kvsites.ie/ww.plugins/online-store/verify/paypal.php">
When I access it directly, it (obviously) is registered in my web server's access log.
When I actually /use/ the form, though, the payment goes through successfully, but the IPN does not appear in PayPal's IPN history page, and does not appear in Apache's logs.
This is something that worked perfectly for months, and only recently has stopped working completely.
Paypal IPN notification are down at the moment. See on Twitter.