Paypal Button: sandbox vs production - paypal

I'm trying to integrate a Paypal Button but I'm getting error on sandbox while it looks working on production.
The code is:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> -->
<input type="hidden" name="business" value="email#accountonsandbox.local">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://return_url">
<input type="hidden" name="cancel_return" value="http://cancel_url">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="cbt" value="Back">
<input type="hidden" name="notify_url" value="http://notify_url">
<input type="hidden" name="custom" value="customdata">
<input type="hidden" name="item_name" value="item_name">
<input type="hidden" name="amount" value="6">
<input type="hidden" name="currency_code" value="EUR">
<img alt="" border="0" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
<input type="hidden" name="lc" value="it_IT">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0" width="140"
src="https://www.paypalobjects.com/webstatic/en_US/btn/btn_paynow_cc_144x47.png"
alt="Paga con PayPal">
</form>
If the first line is production, it works (I see paypal's page to make payment), if I switch with line 2 (sandbox) I'm getting an internal server error from paypal's server showing the error page.
This situation is going on by more than 10 days but I can't deploy it in production without test it.
Sandbox status shows that everything is working, I don't have idea how to solve this.
UPDATE
The error is: http://imgur.com/a/vF3wC
It's in italian, translating it should be something like: There was a system error. Try later.

Related

Paypal sandbox producing message 3005

I have been struggling with this issue for quite a while now. I am trying to test a PayPal button implementation with their Sandbox, and have the following code:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="email#example.com">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="Item Name">
<input type="hidden" name="no_note" value="1">
<input type="hidden" value="http://XX.XX.XX.XX" name="return">
<input type="hidden" name="src" value="1">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_subscribe_LG.gif:NonHostedGuest">
<table>
<tr><td><input type="hidden" name="on1" value="First">First Name</td></tr><tr><td><input type="text" name="os1" maxlength="200"></td></tr>
<tr><td><input type="hidden" name="on2" value="Last">Last Name</td></tr><tr><td><input type="password" name="os2" maxlength="200"></td></tr>
<tr><td><input type="hidden" name="on0" value="Frequency">Frequency</td></tr><tr><td><select name="os0">
<option value="Weekly">Weekly : £10.00 GBP - weekly</option>
<option value="Monthly">Monthly : £25.00 GBP - monthly</option>
<option value="Yearly">Yearly : £250.00 GBP - yearly</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="option_select0" value="Weekly">
<input type="hidden" name="option_amount0" value="10.00">
<input type="hidden" name="option_period0" value="W">
<input type="hidden" name="option_frequency0" value="1">
<input type="hidden" name="option_select1" value="Monthly">
<input type="hidden" name="option_amount1" value="25.00">
<input type="hidden" name="option_period1" value="M">
<input type="hidden" name="option_frequency1" value="1">
<input type="hidden" name="option_select2" value="Yearly">
<input type="hidden" name="option_amount2" value="250.00">
<input type="hidden" name="option_period2" value="Y">
<input type="hidden" name="option_frequency2" value="1">
<input type="hidden" name="option_index" value="0">
<span id='signupButton'></span>
</form>
This successfully redirects me to the PayPal checkout, but once logged in with my Sandbox buyer account, it produces the following problem consistently:
I've done everything suggested in the error page, but still no luck. Am I missing something?
This is a generic (and ancient) PayPal "our process died attempting to produce a web page" error. Presumably you have some incorrect input or unusual circumstance that causes the crash, but you would be doing everyone a favor if you report this bug to PayPal so that they can fix it (to give a useful error back rather than crashing).
That said, to diagnose I would recommend stripping down to a super-simple button and if that works, try re-introducing the complexity of your button to see what triggers the crash.
However, since the crash happens after login it may also be a bad buyer account (or even a bad seller/buyer account combination) or some such that triggers the edge condition. So I would also try with a different buyer account.

Cancel URL not showing on paypal

This is my form
<form action="https://sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="#param">
<input type="hidden" name="lc" value="IN">
<input type="hidden" name="item_name" value="MyItem">
<input type="hidden" name="amount" value="100.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="cancelUrl" value="http://localhost:9000">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_paynowCC_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypalobjects.com/en_GB/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
What should i also add here so that i can get cancel and back to the buyesr's site option?
Q2- How i will add direct credit card payment rather create paypal account ? please help
i want to show like this
You've misspelt it. It is 'cancel_url'.
on the checkout page, look for the 'cancel_return' hidden form element:
<input type="hidden" name="cancel_return" id="cancel_return" value="" />
set the value of the cancel_return form element to the URL you wish to return to:
<input type="hidden" name="cancel_return" id="cancel_return" value="http://royaltytech.in" />

Paypal IPN test works, but I don´t get any ipn after a sandbox purchase

when I run an ipn test everything works great. The data gets logged into the database as I planned it.. However when I purchase a product via. the sandbox:
money transfered
money accepted
I don´t get any ipn
The form code I use:
<div class="panel-footer">
<form class="btn-block" name="_xclick" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="paypal#**.com">
<input type="hidden" name="item_name" value="product name">
<input type="hidden" name="item_number" value="3500">
<input type="hidden" name="amount" value="50">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="custom" value="<?php echo $sponsored_data[$key]['user_id']; ?>::bteam::50::3500">
<input type="hidden" name="notify_url" value="http://**.com/paypal/ipn.html">
<input type="hidden" name="return" value="http://**.com/sponsor.html">
<input type="hidden" name="shopping_url" value="http://**.com/sponsor.html">
<button type="submit" class="btn btn-lg btn-block btn-default">BUY NOW!</button>
</form>
</div>
As I said, if I run the test on this adress it works fine: http://**.com/sponsor.html
Is the sandbox test not sending any ipn or did I do something wrong ?

notify_url not working anymore in PayPal

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.

Paypal no-shipping variable not working

I'm having some trouble implementing PayPal into a website. I haven't used it in a while and a lot of things have changed since.
The problem I'm having is that i specified clearly that users should not be prompted for their shipping address, however, when the "no paypal account" option is selected, the shipping info is anyways asked.
I know I should ask PayPal, but here people are smarter and kinder. =)
code:
note the: <input type="hidden" name="no_shipping" value="1">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="ventas#ziced.com">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Variables agregadas -->
<input type="hidden" name="notify_url" value="notify.php">
<input type="hidden" name="return" value="return.php">
<input type="hidden" name="cancel_return" value="cancel_return.php">
<input type="hidden" name="page_style" value="primary">
<input type="hidden" name="lc" value="EN">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="Ziced id:">
<input type="hidden" name="amount" value="10">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="quantity" value="1">
<!-- Display the payment button. -->
<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">
<img alt="" border="0" width="1" height="1"
src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
</form>
no_shipping=1 applies to the shipping address. What you're looking at for the buyer on the 'guest checkout form' is the billing address. That's always going to be required.
Here's a little more information for others:
<input type="hidden" name="no_shipping" value="0"> - prompt for shipping address, but do not require one
<input type="hidden" name="no_shipping" value="1"> - do not prompt for shipping address
<input type="hidden" name="no_shipping" value="2"> - prompt for shipping address, and require one
See also: Paypal Address Handling Guide