jms支付corebundle URL返回

时间:2017-03-22 04:46:41

标签: php symfony paypal jmspaymentpaypalbundle

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

我收到了这个错误:

You must configure a return url.

我已经在我的帐户中将返回网址配置为ON,但似乎无效,收到相同的错误。我的确认网址是一个页面,其中有一些文字,如:

 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.

错误来自 OrdersController.php

中的 paymentCreateAction

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

2 个答案:

答案 0 :(得分:1)

您好,您可以在config.yml

中解决添加返回网址和取消网址的问题
jms_payment_paypal:
    username: api username
    password: api password
    signature: api signature
    return_url: https://yourdomain.com
    cancel_url: https://yourdomain.com
    debug: true

答案 1 :(得分:0)

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

    '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