When I use Paypal for checkout on my website, Paypal is showing checkout without Paypal account on Desktop but not on a mobile device.
Do you know could be the reason for this?
This is the form I use to redirect a user to the Paypal checkout page:
<form action="https://www.paypal.com/cgi-bin/webscr" name="paypalForm" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="#######gmail.com">
<input type="hidden" name="item_name_1" value="Product X">
<input type="hidden" name="amount_1" value="<?php echo $price; ?>">
<input type="hidden" name="custom" value="<?php echo $orderKey; ?>">
<input type="hidden" name="SolutionType" value="sole">
</form>
The form is being submitted by JS.
Thanks in advance!
using PayPal standard buttons, or ExpressCheckout, in some instances buyers will be able to pay with a debit/credit card and in some others they will only be able to open an account.
This can depend on many factors such as cookies, mobile/web, time of the day, and many other internal security variables which makes it impossible to predict. You could try to use the variable: solution_type = SOLE, it will give more chances to show the pay with card option but is not guaranteed.
If you wish to process card payments and you have a UK, USA or Canadian account you can think at PayPal Pro:
- for US / Canada, PayPal Payments Pro (https://www.paypal.com/webapps/mpp/paypal-payments-pro)
- for UK, PayPal Website Payments Pro (https://www.paypal.com/uk/webapps/mpp/pro)
Related
I have a web application and I want to integrate the PayPal Sandox to it.
What are the steps to do so?
Since PayPal's integration guides can be unclear for beginners and other online tutorials can be too long for a simple checkout implementation, this Q&A aims to integrate the PayPal Sandbox to your web application quickly and easily. No external libraries or other downloads required.
STEP 1: Create a PayPal Sandbox Account. Follow this guide for test account creation.
STEP 2: Copy below sample HTML code for a basic Buy Now button (Single-Item Payment only):
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="payments#yourbusiness.com">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="Your Product">
<input type="hidden" name="amount" value="25.00">
<input type="hidden" name="currency_code" value="USD">
<!-- Specify checkout options. -->
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://www.yoursite.com/paymentsuccessful.hmtl">
<input type="hidden" name="cancel_return" value="http://www.yoursite.com/paymentcancelled.hmtl">
<!-- Display the payment button. -->
<input type="image" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif">
</form>
form action - value is https://www.sandbox.paypal.com/cgi-bin/webscr, removing "sandbox"
means you are using the live PayPal website
business - does not have to be a real email, text displayed at the upper-left portion of the PayPal checkout page
cmd - _xclick means the button clicked was a Buy Now button
item_name - name of your product
amount - price of your product
currency_code - read here for supported values
no_note - do not prompt buyers to include a note with their payments (0 - false, 1 - true)
no_shipping - do not prompt buyers for a shipping address (0 - prompt but not required, 1 - do not prompt, 2 - prompt and require)
return - URL to which PayPal redirects the buyer's browser after they complete their payment
cancel_return - URL to which PayPal redirects the buyer's browser if they cancel checkout before completing their payment
Output:
References:
Testing Classic API Calls (recommended reading)
Single-Item Payments – Buy Now Buttons (more options available)
HTML Variables for Displaying PayPal Checkout Pages (more options available)
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 need to implement a method where we can allow a clients customer to make a payment to the client via our website - all of which will be setup via our custom CMS.
Our initial plan was to use the following form script to generate a transaction and ask the client to add a return address to our website.
<form name="_xclick" action="https://www.paypal.com/uk/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="someone#someon.com">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="item_name" value="2 x sessions">
<input type="hidden" name="amount" value="50">
<input type="image" class="btn btn-default nom paypalBtn" src="" border="0" name="submit" alt="£50">
</form>
This would potentially work fine - as we could dynamically add the value, business email and item name. Though we are worried that any web savvy person could simply inspect the form in a browser and change the payment value to a more pleasing figure! So we feel we need a better solution.
Does anyone have any suggestions for a cleaner solution?
Log into your PayPal account, click on Merchant Services at the top of the page and then click one Create Payment Buttons for your website. When you create buttons on PayPal they are hosted and secure.
I am trying to test my PayPal "buy now" button. It goes to sandbox page successfully and I do payment from my developer account. Problem is that my that payment do not go to my developer business account after paying with my developer personal account.
Here is my code:
<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="my-developer-business-id#gmail.com">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="test product">
<input type="hidden" name="return" value="some return url">
<input type="hidden" name="amount" value="1">
<input type="image" src="http://www.paypal.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>
Please also tell me how can I make shipping option off... I don't need any shipping option here.
You can try creating button from sandbox account's website.
Steps to create PayPal button:
Login to your seller's test account in sandbox.
Click on 'Merchant Services' tab.
There you will find Create PayPal payment button
Fill out the form as per your requirement.
This will generate a HTML script.
Create a HTML file and copy paste this HTML script. Open the HTML file, You will get a Paypal Button.
Click it and accept transaction by buyers PayPal account.
I have to make a paypal integration in my website for paying person.I found a simple code
<form action="https://www.paypal.com/cgi-bin/webscr" method="POST">
To pay with PayPal now please click on the PayPal icon below:
<input type="hidden" name="cmd" value="_xclick"><br>
<input type="hidden" name="business" value="your#paypal.email"><br>
<input type="hidden" name="item_name" value="Order #{$order_id}"><br>
<input type="hidden" name="amount" value="{$order_amount}"><br>
<input type="hidden" name="currency_code" value="{$currency_iso_3}"><br>
<input type="image" name="submit" src="http://images.paypal.com/images/x-click-but01.gif" alt="Pay with PayPal"><br>
< /form>
Is this secure for payment ?
You are sending the information over SSL/TSL.
If all the certificates are current and valid, you should be fine (so MITM attacks are less likely).
It is what banks and other financial and retail organizations are using - should be OK.
However, you did not really specify your requirements for secure integration - can you provide more information?