I am using HTML variables for PayPal Standard for my donation page. According to this page, it should be possible to set paymentaction=authorization
However, testing says otherwise. The transaction is shown as a completed donation on the recipient account instead of a a pending authorization:
Here are my html variables:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Donation</title>
</head>
<body>
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="donateForm">
<input type="hidden" name="business" value="neil#example.com">
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="notify_url" value="https://example.com/ipn.php">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="https://example.com/return.php">
<input type="hidden" name="image_url" value="">
<input type="hidden" name="lc" value="N/A">
<input type="hidden" name="paymentaction" value="authorization">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="amount" value="25">
<input type="hidden" name="item_name" value="Donation">
<input type="submit" value="Donate later!">
</form>
</body>
</html>
Any ideas?
Related
<form action="https://www.paypal.com/us/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="askerov.ibraqim#mail.ru">
<input type="hidden" name="item_name_1" value="Item Name">
<input type="hidden" name="item_number_1" value="213">
<input type="hidden" name="quantity_1" value="1">
<input type="hidden" name="amount_1" value="21.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="cancel_return" value="http://localhost/cart">
<input type="hidden" name="notify_url" value="http://localhost/cart">
<input type="hidden" name="return" value="http://localhost/cart">
<button class="checkout black-btn" id="checkout" name="submit" type="submit">Checkout</button>
Why I get error 'Things don't appear to be working at the moment. Please try again later.' on submit form Paypal?
I´m running into an issue that I detected today. I have the following paypal button config :
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" i d="paypalFormId">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="mybusinessID">
<input type="hidden" name="lc" value="DE">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="item_name" value="MyProductName">
<input type="hidden" name="amount" value="1.00">
<input type="hidden" name="custom" value="somecustom infos needed in the redirection">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="return" value="https://myreturnurl.com">
<input type="hidden" name="cancel_return" value="https://mycancelurl.com">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="notify_url" value="myIPNUrl">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
<div class="row">
<button type="submit" class="btn btn-submit-next pull-right">Bestellung abschließen</button>
</div>
I didn´t change anything that could impact this code in the last days, nevertheless, redirection POST parameters are missing and redirection is a GET now and not a POST method anymore, even with the rm=2 !
Any idea, what´s going on ?
Best regards,
Antoine
Edited :
I was able to isolate the issue on JSFiddle : if I remove the item_name input then it works. I have no clue why but maybe it helps you guy telling me what I do wrong !
We had the same problem.
You need to enable "PDT", then the custom field will be returned in the "cm" variable of the return url post.
"Auto Return" also needs to be enabled to use "PDT", but you can still set the return URL in the button form post instead of in the "Auto Return" config if you need it to be dynamic.
https://developer.paypal.com/docs/classic/products/payment-data-transfer/
Try out this sandbox pay button and see what the response looks like when it is recorded on our return URL.
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick"><input type="hidden" name="amount" value="0.67">
<input type="hidden" name="cancel_return" value="http://test.smsportal.co.za/onlinePaymentv2/Testing3rdPartyResponse.aspx">
<input type="hidden" name="custom" value="this is the custom variable. it is named 'cm' in the returned Url.">
<input type="hidden" name="return" value="http://test.smsportal.co.za/onlinePaymentv2/Testing3rdPartyResponse.aspx">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="cbt" value="Return to Merchant"> <input type="hidden" name="business" value="paypalmerchant#smsportal.com">
<input type="hidden" name="item_name" value="Credit Purchase">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="button_subtype" value="services"><input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="Pay now"><img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"></form>
Having a very hard to explain issue. I have a custom cart implementation. Some of my cart forms go through fine, but some give back a bad input error with not much additional explanation.
For example, this form submits fine and the payment gateway appears:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="m-app#thezyx.com">
<input type="hidden" name="item_name_1" value="Power Long Sleeve L-Black">
<input type="hidden" name="item_number_1" value="06034">
<input type="hidden" name="amount_1" value="45.00">
<input type="hidden" name="shipping_1" value="4">
<input type="hidden" name="quantity_1" value="1">
<input type="hidden" name="item_name_2" value="Classic B1100 Beanie">
<input type="hidden" name="item_number_2" value="39856">
<input type="hidden" name="amount_2" value="40.00">
<input type="hidden" name="shipping_2" value="0">
<input type="hidden" name="quantity_2" value="1">
<input type="hidden" name="custom" value="custom_string">
<input type="hidden" name="tax_cart" value="0">
<input type="hidden" name="notify_url" value="http://mynotificationurl.com">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="cbt" value="Back to Store">
<input type="hidden" name="bn" value="MY_ShoppingCart_WPS_US">
<input type="hidden" name="return" value="http://www.example.com">
<input type="hidden" name="cancel_return" value="http://www.example.com">
</form>
However this form, generated by the same script, continues to fail:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="m-app#thezyx.com">
<input type="hidden" name="item_name_1" value="Power Long Sleeve L-Black">
<input type="hidden" name="item_number_1" value="06034">
<input type="hidden" name="amount_1" value="45.00">
<input type="hidden" name="shipping_1" value="4">
<input type="hidden" name="quantity_1" value="1">
<input type="hidden" name="item_name_2" value="Classic B1100 Beanie">
<input type="hidden" name="item_number_2" value="39856">
<input type="hidden" name="amount_2" value="40.00">
<input type="hidden" name="shipping_2" value="0">
<input type="hidden" name="quantity_2" value="1">
<input type="hidden" name="item_name_3" value="EXS R1 Poster">
<input type="hidden" name="item_number_3" value="80069">
<input type="hidden" name="amount_3" value="25.00">
<input type="hidden" name="shipping_3" value="0">
<input type="hidden" name="quantity_3" value="1">
<input type="hidden" name="custom" value="custom_string">
<input type="hidden" name="tax_cart" value="0">
<input type="hidden" name="notify_url" value="https://mynotificationurl.com">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="cbt" value="Back to Store">
<input type="hidden" name="bn" value="MY_ShoppingCart_WPS_US">
<input type="hidden" name="return" value="http://www.example.com">
<input type="hidden" name="cancel_return" value="http://www.example.com">
</form>`
These forms are identical with exception to the third product in the list. The first form works and the second does not. I see no issues with any of the input data.
Also important to note that I ONLY get this error with more than 1 item in the cart, and it has nothing to do with individual products. When the third product in the second form is the only item in the cart, it submits fine. All of the data is the same. Am I crazy or is this a Paypal bug, or are they doing maintenance?
Here is the url Paypal redirects to when it fails:
https://www.paypal.com/webapps/shoppingcart/error?flowlogging_id=4936eeb7c68aa&code=BAD_INPUT_ERROR&mfid=1493965871301_4936eeb7c68aa
Thank you in advance for any help!!
Got a response back from Paypal today. It seems that in recent updates to their platform, they set a character limit on the custom field to 256.
My custom fields would fill up with more data the more items that were added to the cart, so that's why the error was only on multi-item carts. There seems to be not a lot of documentation on this.
Here was another question I found useful: Paypal html button custom field limit
I am using Paypal Pros iframe implementation and all is working fine...
<iframe name="hss_iframe" width="570px" height="540px"></iframe>
<form style="display:none;" target="hss_iframe" name="form_iframe" method="post" action="https://securepayments.paypal.com/cgi-bin/acquiringweb?cmd=_hosted-payment">
<input type="hidden" name="cmd" value="_hosted-payment">
<input type="hidden" name="subtotal" value="50.00">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="business" value="KASDFS323234">
<input type="hidden" name="paymentaction" value="sale">
<input type="text" name="custom" value="<?php echo $_REQUEST['email_address']; ?>">
<input type="hidden" name="template" value="templateD">
<input type="hidden" name="notify_url" value="http://www.mydomain.com/notify.php" />
<input type="hidden" name="return" value="http://www.mydomain.com/thankyou">
</form>
My problem is that the return URL of www.mydomain.com/thankyou is opening up inside of the iframe instead of reloading the browser with that page.
Has anyone experienced a similar issue?
i have an problem with integration of paypal sandbox for Australia.
in back end i enabled all tab except billing_phone number. when i click pay now i get following error Please return to the payment page and correct the address. here i am attaching my code. thanks in advance
<iframe name="hss_iframe" width="600px" height="600px" style="margin-top:-5px"></iframe>
<form style="display:none" target="hss_iframe" name="form_iframe" method="post" action="https://securepayments.sandbox.paypal.com/acquiringweb">
<input type="hidden" name="cmd" value="_hosted-payment">
<input type="hidden" name="currency_code" value="AUD">
<input type name="subtotal" value="71">
<input type="hidden" name="business" value="FK4PGWANVUF9C">
<input type="hidden" name="shipping" value="0">
<input type name="paymentaction" value="sale">
<input type="hidden" name="template" value="templateD">
<input type="hidden" name="invoice" value="12345">
<input type="hidden" name="billing_first_name" value="John">
<input type="hidden" name="billing_last_name" value="Due">
<input type="hidden" name="billing_address1" value="5 Cromwell St">
<input type="hidden" name="billing_address2" value="Glen Iris">
<input type="hidden" name="billing_city" value="Glen Iris">
<input type="hidden" name="billing_state" value="VIC">
<input type="hidden" name="billing_zip" value="3146">
<input type="hidden" name="buyer_email" value="mark#bssound.com.au">
<input type="hidden" name="billing_country" value="AU">
<input type name="return" value="https://122.165.58.219/team2/wpp-hosted/receipt_page.html">
</form>
<script type="text/javascript">
document.form_iframe.submit();
</script>
My code wasn't working either, but I didn't have the billing fields which I have now added and it worked.
I didn't have:
<input type="hidden" name="currency_code" value="AUD">
<input type="hidden" name="shipping" value="0">
Hope this helps anyone
I had the same problem. I resolved it by adding the same bunch of fields but without "billing_". In your case it will be:
<input type="hidden" name="first_name" value="John">
<input type="hidden" name="last_name" value="Due">
<input type="hidden" name="address1" value="5 Cromwell St">
<input type="hidden" name="city" value="Glen Iris">
<input type="hidden" name="state" value="VIC">
<input type="hidden" name="zip" value="3146">
<input type="hidden" name="country" value="AU">
I don't know whether it's important or not but I also removed both "billing_address2" and "address2".