Yandex_money_api: illegal_param_ext_auth_success_uri



我尝试用 api yandex 钱付款。我使用

instance_id = ExternalPayment.get_instance_id(client_id)['instance_id']
api = ExternalPayment(instance_id)
def wallet_payments(access_token, ym_account, total, api):
    wallet = Wallet(access_token)
    request_options = {
    "pattern_id": "p2p",
    "to": ym_account,
    "amount_due": total,
    "comment": "test payment comment from yandex-money-python",
    "message": "test payment message from yandex-money-python",
    "label": "testPayment",
    "test_payment": True,
    "test_result": "success"
    }
    request_result = api.request(request_options)
    process_payment = api.process({
    "request_id": request_result['request_id'],
    })
    return process_payment['status']

request_result['status']返回成功,但之后

`process_payment = api.process({
    "request_id": request_result['request_id'],
    })`

我得到{'status': 'refused', 'error': 'illegal_param_ext_auth_success_uri'}.我该如何解决这个问题?

来自 yandex 文档:

illegal_param_ext_auth_success_uri:
ext_auth_success_uri参数的值缺失或无效。

因此,您可能需要定义一个ext_auth_success_uri参数,该参数将是一个侦听器URL,该侦听器url在成功的情况下接收yandex api响应。

您可能也需要这个相同的,但在出现错误的情况下:

illegal_param_ext_auth_fail_uri:
ext_auth_fail_uri参数的值缺失或无效。

来源: https://tech.yandex.com/money/doc/dg/reference/process-payment-docpage/

相关内容

  • 没有找到相关文章

最新更新