2

I want to transfer money between two PayPal accounts without forcing user to enter information as in Express checkout.

Is there any way to do it via OmniPay?

I am using this code for express checkout.

$gateway = Omnipay::create('PayPal_Express');
  $gateway->setUsername('ABCD');
  $gateway->setPassword('ABCD');
  $gateway->setSignature('ABCD');
  $gateway->setTestMode(true);

  $params = array(
      'amount' => '400.00',
      'currency' => 'USD',
      'description' => 'ABCD funds transfer',
      'returnUrl' => 'http://abcd.com/jj/payment/paypal_success/'.$session['id'],
      'cancelUrl' => 'http://abcd.com/jj/payment/index'
   );
  $response = $gateway->purchase($params);
  $response = $response->send(); 
  $response->redirect();
Abraham
  • 101
  • 6

1 Answers1

1

You can accomplish this via Adaptive Payments if:

  1. The sender account is your account. This would be considered an implicit payment; or
  2. You have permission to act on behalf of the sender through granted API permissions.

Otherwise, the sender has to authenticate the transaction.

  • The above is the correct answer from the PayPal side of things. From the Omnipay side of things, Omnipay-PayPal does not currently have support for Adaptive Payments (yet). I have plans to implement it at some point soon, however I will be implementing it in the Omnipay\PayPal_Rest gateway not the PayPal_Express gateway. If you wish to make use of that code when it appears in Omnipay then I suggest you migrate your application from PayPal_Express to PayPal_Rest. I would be interested to hear Robert's input on Express vs REST gateway. – delatbabel Nov 27 '15 at 03:38