Payum omnipay 和 Skrill

Payum omnipay and Skrill

我正在尝试使用 Payum 1.0、Payum Bundle 1.0 和 Omnipay bridge with omnipay-skrill bundle 在我的应用程序中实现支付,因为开箱即用不支持 skrill。

payum.yml

payum:
    security:
        token_storage:
            XXX\PaymentBundle\Entity\PaymentToken: { doctrine: orm }

    storages:
        XXX\PaymentBundle\Entity\Payment: { doctrine: orm }

    gateways:
        skrill:
            omnipay:
                type: Skrill
                options:
                  email: me@me.net
                  notifyUrl: /payment/skrill
                  testMode: true

这是我的控制器准备操作:

public function prepareAction()
{
    $paymentName = 'skrill';

    $storage = $this->get('payum')->getStorage('XXX\PaymentBundle\Entity\Payment');

    $payment = $storage->create();

    $payment->setNumber(uniqid($this->container->getParameter('shoppingCart')));
    $payment->setCurrencyCode('EUR');
    $payment->setTotalAmount($this->container->getParameter('price_of_xxx'));
    $payment->setDescription('desc');
    $payment->setClientId($this->getUser()->getId());
    $payment->setClientEmail($this->getUser()->getEmail());
    $payment->setLanguage('EN');

    $storage->update($payment);

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

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

因此,当我访问与准备操作相关的 link 时,我得到了 Payum 信用卡表格。但是当我输入所有数据作为响应时,我收到一条错误消息,指出必须提供语言参数。我无法弄清楚为什么会这样,因为我尝试将语言参数放入配置文件并设置支付语言字段。我想它必须以表单数据作为隐藏字段发送。

是否可以将用户重定向到 https://pay.skrill.com/app/?sid= 使用参数并从 Skrill 服务器获取对 captureDoneAction 的响应?

尝试将语言设置为如下详细信息:

$payment->setDetails(array(
        'language' => 'EN',
));