Yandex_money_api: illegal_param_ext_auth_success_uri

Yandex_money_api: illegal_param_ext_auth_success_uri

我尝试使用 api yandex money 进行付款。 我用

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'] returns 成功,但在

之后
`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:
The ext_auth_success_uri parameter has a missing or invalid value.

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

你可能也需要这个,它是一样的,但以防出错:

illegal_param_ext_auth_fail_uri:
The ext_auth_fail_uri parameter has a missing or invalid value.

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