条纹上无法识别的选项

时间:2017-04-24 14:06:24

标签: symfony paypal stripe-payments sylius payum

我正在尝试为我的网络应用程序安装和配置Stripe。 我必须使用Sylius 0.18.0。 我用这个tuto安装了Stripe:http://sylius-older.readthedocs.io/en/latest/cookbook/stripe.html(我也试过了4.8版)

但是我有一个问题:

  

致命错误:未捕获的异常' Symfony \ Component \ Config \ Definition \ Exception \ InvalidConfigurationException'带有消息'无法识别的选项" factory,secret_key,publishable_key,payum.template.layout,payum.template.obtain_token"在" payum.gateways.stripe_checkout" '在/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php:317堆栈跟踪:#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):第317行的/var/www/html/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php中的Symfony \ Component \ Config \ Defini

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

当我尝试配置paypal时,我遇到了同样的问题。

我尝试了很多"解决方案"但问题仍在这里...... 谢谢你的时间。

1 个答案:

答案 0 :(得分: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

但是,下拉列表中没有Stripe选项来选择付款方式