1

我需要为我正在使用 Authorize.net API 开发的系统进行支付处理的部分授权。

我正在查看文档并尝试通过沙盒帐户发送部分身份验证付款,但我splitTenderPayments在交易响应中没有收到任何内容,即使看起来是正确的transactionSettings

这是 API 请求:

api_request = {
    "createTransactionRequest": {
        "merchantAuthentication": {
            "name": f"{merchant_account.api_id}",
            "transactionKey": f"{merchant_account.transaction_key}"
        },
        "transactionRequest": {
            "transactionType": "authCaptureTransaction",
            "amount": str(amount),
            "payment": payment_info,
            "order": {
                "description": "Rental Payment"
            },
            "customer": {
                "email": resident.user.email,
            },
            "billTo": {
                "firstName": resident.user.first_name,
                "lastName": resident.user.last_name,
                "address": f"{resident.property.street_address} - {resident.unit.get_building_and_unit_number()}",
                "city": resident.property.city,
                "state": resident.property.state,
                "zip": resident.property.zip_code,
                "country": "USA"
            },
            "transactionSettings": {
                "setting": [
                    {
                        "settingName": "emailCustomer",
                        "settingValue": "true"
                    }, {
                        "settingName": "allowPartialAuth",
                        "settingValue": "true"
                    },
                ]
            },
        }
    }

这是我的回应:

{'transactionResponse': {'responseCode': '1', 'authCode': '472C0C', 'avsResultCode': 'Y', 'cvvResultCode': 'P', 'cavvResultCode': '2', 'transId': '40038777973', 'refTransID': '', 'transHash': '', 'testRequest': '0', 'accountNumber': 'XXXX1111', 'accountType': 'Visa', 'messages': [{'code': '1', 'description': 'This transaction has been approved.'}], 'transHashSha2': 'E01465B179D74CB98FA3386EB76CAD0C3E1DCBA0854A512F95C2F4909DD07211998A3C6D6256D03E09A6AEF7C06E9C028571FC21B99F846DEF141805DDB8A31E', 'SupplementalDataQualificationIndicator': 0}, 'messages': {'resultCode': 'Ok', 'message': [{'code': 'I00001', 'text': 'Successful.'}]}}

我究竟做错了什么?

4

0 回答 0