I implemented paypal buy now button in email that is sent from my site. I created the the button(html button) dynamically using PHP(amount is variable for the button).
But the button in email takes me to a different website when i click it. Only yahoo mail take me to the "Your order summary" page (which is the actual page i want to go) all other email client(gmail, hotmail) open http://client.updatemyprofile.com/d-l-2AD73FFF-l-o this page. the html code that shows in email are like below.
<form target="_blank" name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" onsubmit="return theMainWindow.showFormWarning(this)" method="post">
<a rel="nofollow" target="_blank" href="http://client.updatemyprofile.com/d-l-2AD73FFF-l-o" lang="en">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="****#*****.com">
<input type="hidden" name="currency_code" value="CAD">
<input type="hidden" name="item_name" value="Agro">
<input type="hidden" name="amount" value="488.97">
<input type="image" src="https://www.paypalobjects.com/fr_FR/i/btn/x-click-but06.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<p></p>
</a>
</form>
Yahoo email button (works)
->
Other emails button (does not work)
->
Need solution for this problem. Thanks in advance.
Related
I am trying to do a mobile shopping cart and wish to make the process as simple as possible.
The client selects the products and I calculate the totals.
He clicks buy now and the total is sent to paypal express.
The product details are stored in our own database.
We need to only allow delivery to paypal account holder address and only verified accounts
I don't want the client to have to enter his delivery address (as it is stored at paypal).
So how can I ease the pain and get the customer details.
I am redirecting back to a page on the mobile when site when completed. Can I pass the data when this happens?
I am using a buy now button:
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" id="business" value="payment#xxxx.com">
<input type="hidden" name="currency_code" id="currency_code" value="USD">
<input type="hidden" name="item_name" id="item_name" value="Teddy Bear">
<input type="hidden" name="amount" id="amount" value="12.99">
<input name="return" type="hidden" value="http://xxxx.com?pageToJump=pagePayPalCompleted" /> <input name="cancel_return" type="hidden" value="http://xxxx.com?pageToJump=pagePayPalCancelled" />
<input type="image" src="http://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
MrWarby.
If you are using a Buy Now button this information is not passed back by default, you would need to enable PaymentDataTransfer: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/paymentdatatransfer/ or InstantPaymentNotification https://developer.paypal.com/webapps/developer/docs/classic/products/instant-payment-notification/
I have a page on my computer that has a simple buy now button with the following code:
<script src="paypal-button-minicart.min.js"></script>
<script src="paypal-button.min.js?merchant=8TYNWA5KGBSPE"
data-button="buynow"
data-name="My product"
data-amount="15.00"
></script>
<form action="https://www.sandbox.paypal.com/cgibin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="8TYNWA5KGBSPE">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="Football lessons">
<input type="hidden" name="amount" value="15.00">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add special instructions to the seller:">
<input type="hidden" name="no_shipping" value="2">
<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" 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>
But I get the error:
PayPal cannot process this transaction because of a problem with the seller's website
When I click on it, I'm logged in as a test user on the sandbox and I don't know what else to try. Why am I getting the 'cannot process this transaction' error?
To generate a non-hosted/clear text button follow these steps:
Log in your PayPal account www.paypal.com
Click the tab "Merchant Services" to access the Merchant Tools tab.
In the Website Payment Standard section select the type of button you would like to create (Buy Now, Add to Cart, Donation, Etc…).
Click "Create your button now" to access to the PayPal Button Factory.
Fill out the fields you will need in your button (Item name, Price, Currency…).
Click the tab "Step 2: Track inventory (optional)" then uncheck the box "Save button at PayPal".
Click on "Create Button".
The encrypted HTML code of your button will be displayed.
Click on the link "Remove code protection"
The HTML code of your button will be displayed, click "Select Code" and copy it to your website.
You can also find a helpful video here.
Is there a way to pre-populate the "Send Payment" data on PayPal? I don't wan't a pay now button, I just want to be able to have a button for my own internal use that launches the Paypal website and pre populates the fields to send a payment to somebody. Is that possible?
I've tried using a form that submits the data to paypal, but I have a problem, the AMOUNT field doesn't populate, and I have no idea what I'm doing wrong!
This is what I have so far:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target = "paypal">
<input type="hidden" name="cmd" value="_send-money">
<INPUT TYPE="hidden" name="charset" value="utf-8">
<INPUT TYPE="hidden" NAME="email" VALUE="someone#gmail.com">
<INPUT TYPE="hidden" NAME="currency_code" VALUE="USD">
<input type="hidden" name="amount" value="15.00">
<input type="submit" value="Open Paypal">
</form>
You could try redirecting to the paypal.me/accountname/moneyamount (example: paypal.me/johnsmith/50) to have it bring you to a page that pays the john smith account with a pre-filled amount of $50. This functionality is set up by default.
https://www.paypal-community.com/t5/Products-and-Services/Can-the-PayPal-me-URL-be-modified-to-pre-fill-the-quot-Note-quot/td-p/1509015
I use on my site Paypal hosted bottons. When visitors click buttons on my site, a process all data on server, after that i get from paypal via api special link and simply redirect visitors to Paypal
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XXXXXXXXXXXXX
All data like paypal account, custom field, prices and sicounts are safe.
Now I want to implement third party shopping cart on my site. I want to prepare all data like product name, price, discounts, coupons, special offers, etc on server side and redirrect visitors to paypal
But I can't find analog of hosted button for shopping cart form on Paypal manuals
So I should to use usual form with hidden fields
<div>
<form method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="my#email.com">
<input type="hidden" name="custom" value="asgasgasgagahsdgsdghsgag">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="return" value="http://return.link">
<input type="hidden" name="cancel_return" value="http://cancel.link">
<ul>
<li>
<input name="quantity_1" value="1">
<input type="hidden" name="item_name_1" value="Product 1">
<input type="hidden" name="amount_1" value="25.01">
<input type="hidden" name="discount_amount_1" value="5.00">
</li>
<li>
<input name="quantity_2" value="1">
<input type="hidden" name="item_name_2" value="Product 2">
<input type="hidden" name="amount_2" value="12.71">
<input type="hidden" name="discount_amount_2" value="5.00">
</li>
</ul>
<input type="submit" value="Checkout">
</form>
</div>
I don't like this way, cause data like account email, custom variable, prices and discounts are note safe
Is there any analog of hosted button for shopping cart in paypal?
I would recommend using the Express Checkout API instead of Payments Standard. This gives you complete freedom to customize the checkout solution the way you need to and use your own dynamic variables, etc. but everything is nicely hidden from users because it all happens over the API.
I'm trying to set up a paypal solution but i'm having some trouble with the RETURNURL.
My form looks like this.
<form method="post" action="https://api-3t.paypal.com/nvp">
<input type="hidden" name="USER" value="<%=PayPal_API_Username%>">
<input type="hidden" name="PWD" value="<%=PayPal_API_Password%>">
<input type="hidden" name="SIGNATURE" value="<%=PayPal_API_Signature%>">
<input type="hidden" name="VERSION" value="65.0">
<input type="hidden" name="PAYMENTREQUEST_0_PAYMENTACTION" value="Sale">
<input type="hidden" name="PAYMENTREQUEST_0_CURRENCYCODE" value="DKK">
<input type="text" name="PAYMENTREQUEST_0_AMT" value="<%=Amount%>.00">
<input type="hidden" name="CUSTOM" value="<%=GUID%>">
<input type="hidden" name="RETURNURL" value="http://<%=c_mainDomain%>/return.html">
<input type="hidden" name="CANCELURL" value="http://<%=c_mainDomain%>/cancel.html">
<input type="hidden" name="METHOD" value="SetExpressCheckout">
<input type="submit" name="submit" value="Videre til betaling med Paypal">
</form>
When i submit the form it goes to "https://api-3t.paypal.com/nvp" and shows the message below.
TOKEN=EC%2d2XR31554RN094031R&TIMESTAMP=2012%2d01%2d03T10%3a23%3a11Z&CORRELATIONID=a0c80a35bfde2&ACK=Success&VERSION=65%2e0&BUILD=2271164
Shouldn't it send me back to my own page, to the "RETURNURL"? or is there something i'm missing
Yeah, I'm pretty sure, that my comment was right.
This POST should be done by your web app server - transient to the client.
Just before the user clicks the 'pay' button (when you render the site) on your web app - you call the setExpressCheckout, then you read the token from the answer and apply it to the button.
Then after the user clicks he is redirected to paypal site and returns to your page by returnURL.
Please make sure you exactly understand the whole process. Giving too much information to your users may be a potential vulnerability to your payments module.
EDIT: I guess that the form you've created is from PayPal's tutorial. Please notice that it is for testing and understanding the whole process only.