Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Paypal transfer money from one account to another

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?

like image 797
draganstankovic Avatar asked Nov 04 '22 21:11

draganstankovic


1 Answers

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

like image 140
Robert Avatar answered Nov 15 '22 05:11

Robert