Error: Credit card details has to be set explicitl

2019-08-14 15:42发布

I use Payum stable version 0.13 and Zend framework v2 for make payments via AuthorizeNet. My code for test:

    $storage = $this->getServiceLocator()
        ->get('payum')
        ->getStorage('LowbiddoPayment\Entity\AgreementDetails');

    $details                = $storage->create();
    $details['currency']    = 'USD';
    $details['amount']      = 100;
    $details['card_num']    = new SensitiveValue('4111111111111111');
    $details['exp_date']    = new SensitiveValue('10/16');
    $details['description'] = 'Test';
    $storage->update($details);

    $this->getServiceLocator()
        ->get('payum.security.token_factory')
        ->setUrlPlugin($this->url());

    $doneUrl = $this->url()->fromRoute('payment_done', array('id' => $orderId), array('force_canonical' => true));

    $captureToken = $this->getServiceLocator()
        ->get('payum.security.token_factory')
        ->createCaptureToken('authorize-net-aim', $details, $doneUrl);

I have this error

/vendor/payum/payum/src/Payum/AuthorizeNet/Aim/Action/CaptureAction.php:58

Credit card details has to be set explicitly or there has to be an action that supports ObtainCreditCard request.

How can I fix it? Thanks!

1条回答
对你真心纯属浪费
2楼-- · 2019-08-14 16:33

PayumModule does not provide (yet) a built-in ObtainCreditCardAction. So there are two ways to go.

查看更多
登录 后发表回答