1

我正在使用 payum 网站文档中的示例来创建使用 paypal 快速结帐的付款。我被重定向到 Paypal,但即使我指定了金额和描述,​​paypal 也会显示“当前购买”,它会列出描述和价格。

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

如何让 Payum 将详细信息传递给 Paypal。有我可以设置的变量列表吗?我也想禁用运输。

    $payment = $storage->createModel();
    $payment->setNumber(uniqid());
    $payment->setCurrencyCode('AUD');
    $payment->setTotalAmount(123);
    $payment->setDescription("test");
    $payment->setClientId(1);
    $payment->setClientEmail("test@test.com");

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

1 回答 1

3

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.

于 2014-12-22T20:06:33.373 回答