My need: I want users to click on button and goes to paypal, where they can login or add the credit card details and payment should be get done. In short, I don't want to store credit card info on my website.
I found 'Express Checkout' is a suitable paypal method for the same. Am I right?
Does this method requires return urls on https only or can work with simple urls?
Can anyone help me with tutorial or something for the same?
Thanks for all of your support.
Here is an excellent PHP Class for PayPal IPN I've used countless times, which doesn't require user registration: http://www.micahcarrick.com/php-paypal-ipn-integration-class.html
Incidentally, IPN lets you set a return URL via PayPal, though with that class you can send a return URL to IPN before the user pays.
If you want a tutorial or more help though you'll need to tell us which language you're using.
The easiest and most flexible solution that comes without a monthly fee, and is available globally, is PayPal Express Checkout. Express Checkout does not require a https return/cancel URL.
Here is how it works:
Express Checkout is based on three API calls; SetExpressCheckout, GetExpressCheckoutDetails and DoExpressCheckoutPayment.
SetExpressCheckout sets up the payment and returns a token.
You redirect the buyer to https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=TOKEN-HERE, where TOKEN-HERE is the token you received earlier
After the buyer has agreed to the payment, he is returned back to your site.
You can call GetExpressCheckoutDetails and supply the token as a parameter to get the PAYERID of the buyer.
Call DoExpressCheckoutPayment with the token and PAYERID supplied to finalize the payment
Note: If you want to force the 'card details' screen to be displayed initially, and allow buyers to pay without having a PayPal account, ensure you're setting SOLUTIONTYPE to 'Sole' and LANDINGPAGE to 'Billing' in your SetExpressCheckout API request.
In addition, the 'PayPal Account Optional' setting must be switched to 'On' inside the Payment Receiving Preferences of your PayPal Profile.
You can find additional documentation for Express Checkout at https://www.x.com/community/ppx/documentation#ec as well as the SDK's and sample code at https://www.x.com/community/ppx/sdks#NVP
Related
i'm using CreateInvoice.php this code for creating paypal invoices. But problem is just like express checkout and formal paypal checkout i can't figure out how to add notify_url , cancel_url, return_url while creating invoices.
And in samples i can't find how to accomplish this job.
The parameters you are asking about are not relevant to the invoicing API.
notify_url is to specify an IPN URL. The REST API does not use IPN, though. Instead, it uses Webhooks. You can register those manually within your REST App in your PayPal developer account, or you can set them up with the API.
cancel_url and return_url are used with things like the checkout APIs so that PayPal knows where to send the user when they make those actions. The CreateInvoice invoice API would not need this, though, because there is no redirect to PayPal / login happening with the user.
Instead, it's simply using your API credentials to create the invoice and give you a success or fail result. Based on that result you can redirect wherever you want. Again, you're never leaving your app in this case, so you don't need to specify where to be sent back.
Hope that helps.
Hi i am getting two options while integrating the paypal with my PHP code
1. Pay via paypal
2. Create a paypal account
Whereas i Need an option Of
Payment through Debit/Credit Card
How can i get that,,
i reffer to thisThis Link But unable to find the paypal profile and more options option, Can anyone help me
The only way to force Guest Checkout (which is what PayPal calls it when somebody uses a credit card from their checkout pages without signing in to a PayPal account) is to use the Express Checkout APIs.
This will allow you to set parameters that provide the Guest Checkout experience in all instances where it's available. Keep in mind that even with this configured correctly, Guest Checkout is simply not available for all buyers in all countries, so you still won't get it for 100% of your customers if you're selling world wide.
Guest Checkout is available in PayPal Standard Payments, too, but it's cookie based, so it's very unreliable. If the browser in use has ever had anybody sign in to a PayPal account then it will assume the current user will be signing in, too, and it will not prominently display the Guest Checkout option. This is what you are able to avoid by using the Express Checkout APIs.
This PayPal PHP SDK will make the Express Checkout calls very quick and easy for you. Specifically, you'll be working with:
SetExpressCheckout
GetExpressCheckoutDetails
DoExpressCheckoutPayment
In your SetExpressCheckout request you'll make sure to include the follow parameters:
SOLUTIONTYPE=Sole
LANDINGPAGE=Billing
USERSELECTEDFUNDINGSOURCE=CreditCard
This will ensure that the user sees the Guest Checkout experience.
Direct processing of Credit Cards is deprecated.
But people can pay without PayPal account - it's called guest payments.
Use the PayPal API and allow the optimal checkout to YES and then customers can pay either through credit card / paypal account.
https://developer.paypal.com/docs/integration/direct/payments/guest-payments/#
I would like to implement this scenario via Paypal REST API
Client creates an Billing Agreement
Approves it and goes back to the our website
There he will fill out some data and press "Finish and pay"
Then a request via API will be done, so the payment will be processed.
I already created the agreement with setAutoBillAmount("no").
So the client will not be charged immediatelly.
But i cannot find a call in the api docs
http://paypal.github.io/PayPal-PHP-SDK/sample/#billing
where i can make a call to API to charge the client according to the Preapproved payment he made.
Can someone point me to the right direction?
thx
If you want to use pre approved payment in PayPal then I would recommend you to use suggest Pre-approval API. You can use PayPal REST for Recurring Billing but it does not have a feature of Pre-approval yet.
I have designed a store using PayPal Express Checkout. They have recently decided that they want separate shipping rates for local and international orders. I am currently pulling all shipping information from PayPal. Is it possible to send the total to PayPal AFTER receiving the buyer's shipping information?
What you want is the PayPal Instant Update / Callback API.
This is a callback from PayPal to your website to prepopulate shipping options on the PayPal website while the buyer is doing the checkout on PayPal.
It allows you to specify the specific shipping cost for the transaction after the SetExpressCheckout API has already been called.
How the Express Checkout flow would work with Instant Update / Callback implemented:
See "Setting up the Callback" on https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECInstantUpdateAPI for detailed instructions.
This page also includes an example API call and an example response for the callback; the response your callback file should return.
Let me know if anything is not clear and I'll try to hunt for some example files.
Note: In Live mode, the callback URL on your site must be SSL-secured (HTTPS). In Sandbox you can use both HTTP and HTTPS.
You can send, in the DoExpressCheckoutPayment request, a final payment amount of up to 115% of the original amount of the payment you specified in the SetExpressCheckout request.
I don't have access to paypal at the moment, but you can setup shipping in the merchant services section of paypal (I get confused as to where it is). If it is not there you can check under My Profile, My selling tools and under shipping in there.
There you should be able to setup shipping through paypal.
If you don't want to do it through paypal, you need to bring the customer back to your webpage where they can confirm the shipping and do the paying there. Sorry for the non answer, hope this leads you the right direction.
I am aware of this recommendation How to send money to any paypal account but what I've tried so far seems unsatisfiable to me...
I am working on a social networking site on which I want to allow users to pay for services via paypal account. The actual payment should transfer money from a user's paypal account to my paypal account.
Here is what I came up so far. I tried to use adaptive api and PAY option and it works if I use my account and my credentials to send money to some other user. I have biz account and this is known as implicit approval. If some other user wants to pay me in this way he has to have business account and to allow my app to save his credentials like his paypal userid, password and signature which is not good.
Next thing I tried is to use permissions api for that purpose. As far as I understand this should work similar to generating token that allows my app to post on facebook on behalf of user. I've managed to create a signature as specified in the permissions api documentation for the following permissions:
$permissions = array('DIRECT_PAYMENT', 'MASS_PAY', 'TRANSACTION_DETAILS');
And now I don't know how to use this signature to transfer money to my paypal account from the paypal account that granted my app the above mentioned permissions.
Any suggestion on what I am doing wrong or better way to do this?
Um, correct me if I'm wrong here, but what you propose is a fairly regular checkout flow with one buyer and one seller (recipient).
You can use PayPal Express Checkout for this and simply set NOSHIPPING=2, which will turn shipping address collection off.
Alternatively, if you have a US PayPal account, sign up for PayPal Express Checkout for Digital Goods at https://www.paypal.com/digitalgoods and you'll be able to use a fancy JavaScript-based LightBox checkout experience (also referred to as 'inline checkout').
Express Checkout is fairly in that it only requires a minimum of two API calls; SetExpressCheckout and DoExpressCheckoutPayment.
SEND: SetExpressCheckout and supply a RETURNURL, CANCELURL, AMT (amount to be charged) and your API credentials.
RECEIVE: You'll receive a TOKEN back from PayPal. Append this token to the following link: https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-XXXXXX (where EC-XXXXX is your token).
Once the buyer agrees to the payment, he'll be redirected back to your RETURNURL, after which you can either automatically, or after showing a purchase summary, call DoExpressCheckoutPayment. Supply the TOKEN again and include the PayerID (returned in GET appended to RETURNURL, or available by calling GetExpressCheckoutDetails with the TOKEN).
Once DoExpressCheckoutPayment acknowledges with ACK=Success, the funds will have been transferred from the buyerÅ› PayPal account balance and/or card.
Take a look at https://www.x.com/ > Dev Tools as well for further documentation, sample code and their SDK's