【问题标题】:jms payment corebundle integtation issue URL returnjms支付corebundle集成问题URL返回
【发布时间】:2017-08-13 10:23:36
【问题描述】:

我在 symfony 2.6 中集成了 jms 支付包。 我已经关注了所有文档:http://jmspaymentcorebundle.readthedocs.io/en/stable/guides/accepting_payments.html

我收到了这个错误:

 You must configure a return url.

我已在我的帐户中将返回 URL 配置为 ON,但它似乎不起作用,出现相同的错误。 我的确认 url 是一个页面,其中有一些文本,例如:

  Thank you for your payment. Your transaction has been completed,
  and a receipt for your purchase has been emailed to you.
  You may log into your account at www.paypal.com to view details of this transaction.

错误仍然存​​在。 我该怎么办?

【问题讨论】:

  • 这个错误是从哪里来的?哪个文件?能否给出具体代码?
  • 这是文件:在 vendor/jms/payment-paypal-bundle/JMS/Payment/PaypalBundle/Plugin/ExpressCheckoutPlugin.php 中的第 327 行 第 327 行:抛出新的 \RuntimeException('你必须配置返回url。');
  • 不,那不是它所在的地方!您可以使用调试 URL 吗?例如,如果您的 URL 是 http://localhost/submitpayment,那么您将 app_dev.php 附加到 URL,这将是 http://localhost/app_dev.php/submitpayment。然后您应该能够看到your 文件中的哪一个有问题。可能在您的一个控制器文件中...
  • 我已经在使用前端控制器 app_dev.php,当我点击我的链接访问付款时,在堆栈跟踪中,我得到了我告诉你的文件。否则,状态为 500 Internal server error,在控制器 Orders 中,在路由“app_orders_paymentcreate”中创建支付操作
  • 我改变了 throw $result->getPluginException();重定向到特定的 url ,并出现相同的错误

标签: symfony paypal jmspaymentpaypalbundle


【解决方案1】:

已解决,它们的意思是在控制器中。我补充说:

'predefined_data' => array(
        'paypal_express_checkout' => array(
            'return_url' => $this->generateUrl('payment_complete', array(
                'orderNumber' => $order->getOrderNumber(),
            ), true),

更多文档http://jmspaymentpaypalbundle.readthedocs.io/en/latest/usage.html

【讨论】:

    猜你喜欢
    • 2017-08-14
    • 2014-07-08
    • 1970-01-01
    • 1970-01-01
    • 2015-06-14
    • 2018-09-11
    • 2012-09-03
    • 1970-01-01
    • 2015-09-02
    相关资源
    最近更新 更多