Paytabs 使用令牌定期付款请求给出 [422 - 无法处理您的请求]错误

问题描述 投票:0回答:1

我通过 Paytabs Tokenization 方法创建了一个令牌,然后使用生成的令牌再次使用

tran_class: recurring
进行请求,但我得到
{'code': 422, 'message': 'Unable to process your request', 'trace': 'PMNT0102.65DCFAF6.0002C7A0'}
作为响应

首次付款请求负载

payload = {
    "profile_id": PROFILE_ID,
    "tran_type": "sale",
    "tran_class": "ecom",
    "cart_id": cart_id,
    "cart_currency": "EUR",
    "cart_amount": amount,
    "cart_description": "Advertising Services",
    "paypage_lang": "en",
    "customer_details": customer_details,
    "shipping_details": customer_details,
    "tokenise": 2,
    "callback": "url",
    "return": "url"
}

从上面我得到了令牌,我将其保存以供将来的付款请求,但是当我尝试使用此令牌请求时,我收到错误

{'code': 422, 'message': 'Unable to process your request', 'trace': 'PMNT0102.65DCFAF6.0002C7A0'}

带有令牌的支付请求负载

payload = {
    "profile_id": PROFILE_ID,
    "tran_type": "sale",
    "tran_class": "recurring",
    "cart_id": cart_id,
    "cart_currency": "EUR",
    "cart_amount": amount,
    "cart_description": "Advertising Services",
    "payment_token": payment_token,
    "tran_ref": tran_ref,
    "callback": "url",
    "return": "url"
}

任何人都可以指导我在这里做错了什么

python payment-gateway tokenize paytabs
1个回答
0
投票

根据文档尝试 cont 而不是在 tran_class 中重复

© www.soinside.com 2019 - 2024. All rights reserved.