Payum Paypal Express checkout details

1.3k Views Asked by At

I'm using the example on the payum website documentation to create a payment using the paypal express checkout. I'm redirected to Paypal, but even though I specified an amount and description, paypal says 'Current purchase' where it would list the description and price.

http://payum.org/doc/0.12/PaypalExpressCheckoutNvp/get-it-started

How can I get Payum to pass the details to Paypal. Is there a list of variables I can set? I also want to disable shipping.

    $payment = $storage->createModel();
    $payment->setNumber(uniqid());
    $payment->setCurrencyCode('AUD');
    $payment->setTotalAmount(123);
    $payment->setDescription("test");
    $payment->setClientId(1);
    $payment->setClientEmail("[email protected]");

    $storage->updateModel($payment);

    $captureToken = $this->get('payum.security.token_factory')->createCaptureToken(
        $paymentName, 
        $payment, 
        'payment_done' // the route to redirect after capture
    );

    return $this->redirect($captureToken->getTargetUrl());  
1

There are 1 best solutions below

0
On

You can do it setting paypal specific details to

$payment->setDetails([
    'L_PAYMENTREQUEST_0_AMT0' => 123,
    'L_PAYMENTREQUEST_0_NAME0' => 'A product name',
]);

Here you can some more fields. Also you can check the Paypal Official documentation.

You can disable shipping the same way using NOSHIPPING Paypal's field. Set it to 1.