2017-04-24 134 views
0

我正在嘗試安裝併爲我的web應用程序配置條紋。 我必須使用Sylius 0.18.0。 我這個政黨成員安裝條紋:http://sylius-older.readthedocs.io/en/latest/cookbook/stripe.html(我也嘗試了版本4.8)無法識別的條紋選項

但是我有一個問題:

Fatal error: Uncaught exception 'Symfony\Component\Config\Definition\Exception\InvalidConfigurationException' with message 'Unrecognized options "factory, secret_key, publishable_key, payum.template.layout, payum.template.obtain_token" under "payum.gateways.stripe_checkout"' in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php:317 Stack trace: #0 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BaseNode.php(264): Symfony\Component\Config\Definition\ArrayNode->normalizeValue(Array) #1 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php(283): Symfony\Component\Config\Definition\BaseNode->normalize(Array) #2 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BaseNode.php(264): Symfony\Component\Config\Definition\PrototypedArrayNode->normalizeValue(Array) #3 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php(307): Symfony\Component\Config\Defini in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php on line 317

Config.yml:

payum: 
    gateways: 
     stripe_checkout: 
      factory: stripe_checkout 
      secret_key: "%stripe.secret_key%" 
      publishable_key: "%stripe.publishable_key%" 
      payum.template.layout: SyliusShopBundle::Checkout/layout.html.twig 
      payum.template.obtain_token: SyliusPayumBundle::Action/Stripe/obtainCheckoutToken.html.twig 

當我嘗試配置貝寶時,我遇到了同樣的問題。

我嘗試了很多「解決方案」,但問題仍在這裏... 感謝您的時間。

回答

1

我找到了一個解決方案:

payum: 
gateways: 
    paypal: 
     paypal_express_checkout_nvp: 
      username: %paypal.express_checkout.username% 
      password: %paypal.express_checkout.password% 
      signature: %paypal.express_checkout.signature% 
      sandbox: true 

    stripe: 
     stripe_checkout: 
      publishable_key: %stripe.publishable_key% 
      secret_key: %stripe.secret_key% 
    omnipay: 
     omnipay: 
      type: Stripe 
      options: 
       apiKey: %stripe.secret_key% 
       testMode: true 

但是選擇條紋是不存在的下拉列表中選擇的付款方式