Using static HTML Pay now buttons what and how do I get Paypal error information returned to my site

PBoydSam
Contributor
Contributor

Hi,

 

I have a simple website to sell a license key for some software I made, Ive used the simple paypal "Pay Now" static buttons to incorporate payment, how can I get paypal information returned to my site, things like a paypal reference or error codes.  Is it something to do with return url query parameters?

 

Im using code like this to call paypal... any help much appreciated!

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="XXX">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="<?php echo getProduct() ?>">
<input type="hidden" name="item_number" value="<?php echo $_SESSION["paymentGuid"] ?>">
<input type="hidden" name="amount" value="<?php echo getAmount() ?>">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="return" value="<?php echo getReturnURL($_SESSION["paymentGuid"]) ?>">
<input type="hidden" name="cancel_return" value="<?php echo getCancelledURL($_SESSION["paymentGuid"]) ?>">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_buynowCC_LG.gif" 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>

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.