I'm using gpixpixel script, and configured it to allow the visitor to buy pixels via Paypal, but upon clicking the "Pay with Paypal" button, the page only shows a DNS error.
Here's the code of the form on the page for a transaction:
<form method="post" action="https://sandbox.paypal.com/cgi-bin/webscr">
<input type="hidden" name="amount" value="1620">
<input type="hidden" name="business" value="testmerchant#nodomain.com">
<input type="hidden" name="cancel_return" value="http://-site-/gpix/get_pixels.php?step=6">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="custom" value="8:c6f79ef0f714fae081a6df9d778df198">
<input type="hidden" name="item_name" value="Pixels: ">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="NotifyURL" value="http://-site-/gpix/paypal_ipn.php?payment_id=8">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://-site-/gpix/index.php">
<input type="hidden" name="rm" value="2">
<p>
<input type="submit" value="Pay with PayPal >>">
</p>
</form>
Also, this page is opened in an iframe within another page (located in the same directory.)
Any help is appreciated.
I can post the link to the website if anyone wants to look at the installation.
You are missing www
Try:
<form method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr">
It was the browser's same origin policy that was restricting the page, which I had embedded as an iframe within another page, from navigating to Paypal's website.
Thanks to Vimal for pointing out the missing www, whose omission created a wrong URL, and obviously wouldn't navigate anywhere.
Related
Sanbox paypal link not working. When click on buy now button it will showing blank white screen only. Before it working fine. I also tested on other website it doesn't worked for me.
kindly reply or let me know how to fix.
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"><input name="cmd" type="hidden" value="_xclick">
<input name="business" type="hidden" value="example#gmail.com">
<input name="item_name" type="hidden" value="1">
<input name="item_number" type="hidden" value="1">
<input name="amount" type="hidden" value="1">
<input type="submit" value="Buy now">
<input name="return" type="hidden" value="http://example.com/success-thank-you/"></form></div>
I have been struggling for the past few days trying to get Paypal to redirect to my website after a successful payment. Instead, it shows this "Thank you for your order" and asks me to click on a link to return to the merchant page, from which it takes 10 seconds to redirect. I thought that the auto return feature was supposed to skip the entire "Thank you for your order" page.
The account in question has auto-return enabled and it has PDT enabled.
Here's the code I have, and to be honest, I do not understand why it does not return automatically after the successful payment is processed.
<form id="paypalForm" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top" style="display:none">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="######gmail.com">
<input type="hidden" name="item_name" value="<?= "Modele ".$_POST['model']." ".$_POST['shp']." de couleur: ".$_POST['clr'] ?>">
<input type="hidden" name="amount" value="<?= $_POST['amount_with_tax'] ?>">
<input type="hidden" name="currency_code" value="CAD">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="return" value="http://######.com/success.php?id=<?= $con->insert_id ?>">
<input type="hidden" name="cancel_return" value="http://######.com/cancel.php?id=<?= $con->insert_id ?>">
</form>
I realize this a sandbox url, but it should work either way, no?
Any help would be amazing.
Thanks.
PS: I have a javascript line that submits the form automatically on page load.
I am trying to make a paypal payment and I have a problem when returning to my page after the payment is completed.
I want to do it dynamically (so I do not want to set it in the paypal's account option, as I may use this account for other things). This is the form I send to paypal:
<form id="paypalForm" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="POST">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="notify_url" value="http://zopomobile.es/pruebas/modules/rmaforsat/ipn_paypal.php">
<input type="hidden" name="item_name_1" value="Pago de su orden a Zopomobile.">
<input type="hidden" name="item_number_1" value="1">
<input type="hidden" name="amount_1" value="259.12">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="custom" value="152">
<input type="hidden" name="business" value="admin-facilitator#zopomovil.es">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="return" value="http://zopomobile.es/pruebas">
<input type="hidden" name="cancel" value="http://zopomobile.es/pruebas/NO">
<input type="hidden" name="rm" value="2">
</form>
I have tried changing the "return" variable to "return_url", still not working.
If you want to automatically re-direct to "http://www.zopomobile.es/pruebas/"
then you need to turn on "Auto Return" on your PayPal profile.
Right now, Auto Return is "OFF" in your profile.
The return parameter is return
https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_profile-website-payments
Check above link to turn on the "Auto Return" feature.
I am using html form to integrate Paypal and my form is as
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="POST">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="hosted_button_id" value="XXXXXXXXXX">
<input type="hidden" name="business" value="admin#domain.com" />
<input type="hidden" name="item_name" value="Item Name" />
<input type="hidden" name="quantity" value="1" />
<input type="hidden" name="amount" value="100.00" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="return" value="http://domain.com/success" />
<input type="hidden" name="cancel_return" value="http://domain.com/fail/" />
<input type="hidden" name="cbt" value="Please Click here to Complete Your Order" />
</form>
When I am testing this Website code on desktop browsers this is posting paypal data back on return url perfectly. But when I am testing same website code on my Mobile browser payapl is not posting back any data on return url. It just get back on return url without any data.
Please help me.
do you get ANY kind of request on callback on mobile? You should log every POST request on callback page and review them
also try with notify_url as well, IPN should be sent here
Please set "no_note"
Please see following links
Link: http://www.paypalobjects.com/en_US/ebook/subscriptions/html.html
I'm pretty sure your problem is that you need to add this line to your code:
<input type="hidden" name="no_note" value="1">
Hope this helps.
I have one code for passing some custom variables to PayPal and these were collected in the return page, but when trying to get these values it is not working
I have a PayPal form like this :
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="submit.png" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"/>
<input type="hidden" name="add" value="1"/>
<input type="hidden" name="custom" value="IP"/>
<input type="hidden" name="cmd" value="_cart"/>
<input type="hidden" name="business" value=""/>
<input type="hidden" name="item_name" value=""/>
<input type="hidden" name="item_number" value=""/>
<input type="hidden" name="amount" value=""/>
<input type="hidden" name="page_style" value=""/>
<input type="hidden" name="no_shipping" value="1"/>
<input type="hidden" name="return" value="index.php?action=success"/>
<input type="hidden" name="notify_url" value="index.php?action=ipn"/>
<input type="hidden" name="cancel_return" value=""/>
<input type="hidden" name="rm" value="2"/>
<input type="hidden" name="cn" value="Additional Information"/>
<input type="hidden" name="currency_code" value="AUD"/>
<input type="hidden" name="bn" value="PP-ShopCartBF"/>
</form>
I am successfully returning to the URL after payment. and there I am just trying to print the POST Variable for now and It is not giving me any values.I have tried by both enabling and disabling 'auto return'. In both case I don't get values. Please help me, thanks in advance.
The "notify_url" will be contacted by paypal asynchronously (directly), without you having anything to do with this transaction. So you will never see in your browser any results whatsoever. You should use some kind of logging in your script to see what is actually being sent. Check your web server's access log to see if paypal is actually contacting your script (and make sure it's not "localhost" you're trying from)
If I remember correctly only the transaction id is sent back to the return_url. The notify_url receives that id also. From there you should be able to communicate both pages to fill your needs.