Abraham
Abraham

Reputation: 101

PayPal money transfer via OmniPay PHP

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();

Upvotes: 2

Views: 331

Answers (1)

PayPal_MSI_Robert
PayPal_MSI_Robert

Reputation: 961

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.

Upvotes: 1

Related Questions