0

是否可以使用 Authorize.Net进行部分退款?例如,我有一笔 300 美元的交易。第一次我需要在这笔交易中退款 100 美元。第二次退款 50 美元。

之后会是怎样的交易状态?

第一个请求:

...
      "refId": "123456",
        "transactionRequest": {
            "transactionType": "refundTransaction",
            "amount": "100.00",}
            "refTransId": "1234567890"
        }
...

第二个请求:

...
      "refId": "123456",
        "transactionRequest": {
            "transactionType": "refundTransaction",
            "amount": "50.00",}
            "refTransId": "1234567890"
        }
...
4

1 回答 1

0

是的,只要您不超过原始交易金额,您就可以针对一笔交易进行多次退款。

下面我支付了 50 美元,然后退款 20 美元和 10 美元。两者都成功了。

这是我最初的 AUTH_CAPTURE 请求:

{
  "createTransactionRequest": {
    "merchantAuthentication": {
      "name": "",
      "transactionKey": ""
    },
    "refId": 38947161,
    "transactionRequest": {
      "transactionType": "authCaptureTransaction",
      "amount": 100,
      "payment": {
        "creditCard": {
          "cardNumber": "4111111111111111",
          "expirationDate": "122020",
          "cardCode": "999"
        }
      },
      "order": {
        "invoiceNumber": "1324567890",
        "description": "this is a test transaction"
      },
      "lineItems": {
        "lineItem": [
          {
            "itemId": "1",
            "name": "vase",
            "description": "Cannes logo",
            "quantity": "18",
            "unitPrice": "45.00"
          },
          {
            "itemId": "2",
            "name": "desk",
            "description": "Big Desk",
            "quantity": "10",
            "unitPrice": "85.00"
          }
        ]
      },
      "tax": {
        "amount": "4.26",
        "name": "level2 tax name",
        "description": "level2 tax"
      },
      "duty": {
        "amount": "8.55",
        "name": "duty name",
        "description": "duty description"
      },
      "shipping": {
        "amount": "4.26",
        "name": "level2 tax name",
        "description": "level2 tax"
      },
      "poNumber": "456654",
      "customer": {
        "id": "18",
        "email": "someone@blackhole.tv"
      },
      "billTo": {
        "firstName": "Ellen",
        "lastName": "Johnson",
        "company": "Souveniropolis",
        "address": "14 Main Street",
        "city": "Pecan Springs",
        "state": "TX",
        "zip": "44628",
        "country": "USA"
      },
      "shipTo": {
        "firstName": "China",
        "lastName": "Bayles",
        "company": "Thyme for Tea",
        "address": "12 Main Street",
        "city": "Pecan Springs",
        "state": "TX",
        "zip": "44628",
        "country": "USA"
      },
      "customerIP": "192.168.1.1",
      "transactionSettings": {
        "setting": [
          {
            "settingName": "allowPartialAuth",
            "settingValue": "false"
          },
          {
            "settingName": "duplicateWindow",
            "settingValue": "0"
          },
          {
            "settingName": "emailCustomer",
            "settingValue": "false"
          },
          {
            "settingName": "recurringBilling",
            "settingValue": "false"
          },
          {
            "settingName": "testRequest",
            "settingValue": "false"
          }
        ]
      },
      "userFields": {
        "userField": {
          "name": "favorite_color",
          "value": "blue"
        }
      }
    }
  }
}

这是我原来的 AUTH_CAPTURE 回复:

{
  "transactionResponse": {
    "responseCode": "1",
    "authCode": "TTJ26B",
    "avsResultCode": "Y",
    "cvvResultCode": "P",
    "cavvResultCode": "2",
    "transId": "40032153203",
    "refTransID": "",
    "transHash": "",
    "testRequest": "0",
    "accountNumber": "XXXX1111",
    "accountType": "Visa",
    "messages": [
      {
        "code": "1",
        "description": "This transaction has been approved."
      }
    ],
    "userFields": [
      {
        "name": "favorite_color",
        "value": "blue"
      }
    ],
    "transHashSha2": "0C9E5A47F93CD5B770A6B4AB24FE0F0D6F3B909066C72A10C4746F48C9886527A18B654736AE8D920D9048A14F2823A0DEC5B5F775A1C48DE9CBCF41C8D28CA3",
    "SupplementalDataQualificationIndicator": 0
  },
  "refId": "38947161",
  "messages": {
    "resultCode": "Ok",
    "message": [
      {
        "code": "I00001",
        "text": "Successful."
      }
    ]
  }
}

这是我的第一个退款请求(成功):

{
  "createTransactionRequest": {
    "merchantAuthentication": {
      "name": "",
      "transactionKey": ""
    },
    "refId": 30777668,
    "transactionRequest": {
      "transactionType": "refundTransaction",
      "amount": 20,
      "payment": {
        "creditCard": {
          "cardNumber": "4111111111111111",
          "expirationDate": "122020"
        }
      },
      "authCode": "40032153203"
    }
  }
}

这是我的第一个 REFUND 回复(成功):

{
  "transactionResponse": {
    "responseCode": "1",
    "authCode": "",
    "avsResultCode": "P",
    "cvvResultCode": "",
    "cavvResultCode": "",
    "transId": "40032153314",
    "refTransID": "",
    "transHash": "",
    "testRequest": "0",
    "accountNumber": "XXXX1111",
    "accountType": "Visa",
    "messages": [
      {
        "code": "1",
        "description": "This transaction has been approved."
      }
    ],
    "transHashSha2": "4CE2D83B56C09494AD5609440E3337A6DEE0F4C74FBC99B218D65F6A121EFFC269F8954AC47C17B3B739E61A860C7B0818A8497D85D314D6E0CD89C9FE71A071",
    "SupplementalDataQualificationIndicator": 0
  },
  "refId": "30777668",
  "messages": {
    "resultCode": "Ok",
    "message": [
      {
        "code": "I00001",
        "text": "Successful."
      }
    ]
  }
}

这是我的第二个退款请求(成功):

{
  "createTransactionRequest": {
    "merchantAuthentication": {
      "name": "",
      "transactionKey": ""
    },
    "refId": 40597686,
    "transactionRequest": {
      "transactionType": "refundTransaction",
      "amount": 10,
      "payment": {
        "creditCard": {
          "cardNumber": "4111111111111111",
          "expirationDate": "122020"
        }
      },
      "authCode": "40032153203"
    }
  }
}

这是我的第二个 REFUND 回复(成功):

{
  "transactionResponse": {
    "responseCode": "1",
    "authCode": "",
    "avsResultCode": "P",
    "cvvResultCode": "",
    "cavvResultCode": "",
    "transId": "40032153319",
    "refTransID": "",
    "transHash": "",
    "testRequest": "0",
    "accountNumber": "XXXX1111",
    "accountType": "Visa",
    "messages": [
      {
        "code": "1",
        "description": "This transaction has been approved."
      }
    ],
    "transHashSha2": "FD146FC0F8F3F31068905EC6C8D252662AA735ACDFAC53B4A8D808060C244C06288700AA8872466C3E240B62130D010CFBDE0473D09B631514A6E2E2CB77804F",
    "SupplementalDataQualificationIndicator": 0
  },
  "refId": "40597686",
  "messages": {
    "resultCode": "Ok",
    "message": [
      {
        "code": "I00001",
        "text": "Successful."
      }
    ]
  }
}
于 2019-05-27T12:46:04.850 回答