Paypal Buy Now button transaction response issue

Paypal Buy Now button transaction response issue,paypal,Paypal,I am using the following code to generate a "Buy Now" button for selling a single item. It takes me to PayPal using the sandbox and does the payment but after I return nothing is received in the response (there is no extra parameter in the URL I get). <form name="_xclick" action="https://www.sandbox.paypal.com/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="steve.johntestemail@gmail.com"> <input type="hidde

I am using the following code to generate a "Buy Now" button for selling a single item. It takes me to PayPal using the sandbox and does the payment but after I return nothing is received in the response (there is no extra parameter in the URL I get).

<form name="_xclick" action="https://www.sandbox.paypal.com/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="steve.johntestemail@gmail.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Book_1">
<input type="hidden" name="amount" value="0.09">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="return" value="http://www.thequeenoflean.com.au">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">

</form>

Will I get the data in get or post?

Actually I want to retrieve the email of the buyer and some other information as well.

Can anyone guide me what my mistake is here?

Thanks in advance.


#1

i tried sandbox, live Paypal payment scenario but it was not working, i tried so many tutorials but the steps mentioned in those tutorials were not working,

finally i got the reason:

i was trying to use Paypal from asian country where it is not supported and works abnormally,and that's why i was not getting response in return. if you use any other VPN with for example(american, Australian etc.. ips where it is supported) it will work fine and return you response accurately.

Thanks,


#2

I know a reason why you're not getting any information.

take a look here: https://stackoverflow.com/a/11404356/279147

you see I have a notify_url parameter in my form, this is a url which will be called by paypal when the payment has been completed, whether it succeeds or fails.

the url is not opened by the browser, popups, etc, it's a "back channel" call to your server to just send data, there is no interaction with the client, so don't put any html, or return anything, it's just a "dead drop" url to dump data, if you put something like

<?php trigger_error(print_r($_POST,true)); ?>

in your code, your error log might show up some information, so then you know you are receiving information,

you're missing that, so you never get any information, unless the user clicks on the return to website button and in my experience that never happens. they just close the browser.

so take a look at my url, add the parameter and then try to do it again.


#3

i tried sandbox, live Paypal payment scenario but it was not working, i tried so many tutorials but the steps mentioned in those tutorials were not working,

finally i got the reason:

i was trying to use Paypal from asian country where it is not supported and works abnormally,and that's why i was not getting response in return. if you use any other VPN with for example(american, Australian etc.. ips where it is supported) it will work fine and return you response accurately.

Thanks,


#4

I know a reason why you're not getting any information.

take a look here: https://stackoverflow.com/a/11404356/279147

you see I have a notify_url parameter in my form, this is a url which will be called by paypal when the payment has been completed, whether it succeeds or fails.

the url is not opened by the browser, popups, etc, it's a "back channel" call to your server to just send data, there is no interaction with the client, so don't put any html, or return anything, it's just a "dead drop" url to dump data, if you put something like

<?php trigger_error(print_r($_POST,true)); ?>

in your code, your error log might show up some information, so then you know you are receiving information,

you're missing that, so you never get any information, unless the user clicks on the return to website button and in my experience that never happens. they just close the browser.

so take a look at my url, add the parameter and then try to do it again.


#5

I don't believe thats the reason you never receive information, thats just an additional cause, the reason is because you dont have a notify url, it just so happens that as well, you have your current circumstances. if the user never clicks go back to website, you will never get the payment data, so you need to implement the notify_url in your form.

#6

I don't believe thats the reason you never receive information, thats just an additional cause, the reason is because you dont have a notify url, it just so happens that as well, you have your current circumstances. if the user never clicks go back to website, you will never get the payment data, so you need to implement the notify_url in your form.