I am trying to place an order using magento 2 rest api through credit card. I am calling the below api POST rest/V1/guest-carts/{cartId}/payment-information(for guests) and rest/V1/carts/mine/payment-information using token(for customers). The payload request is
"paymentMethod": {
"method": "custom_pay",
"additional_data":{
"cc_cid":"000"
"cc_type":"VI",
"cc_exp_year":"2017",
"cc_exp_month":"2",
"cc_number":"xxxxxxxxxxxxxxxx"
}
}
It throws a generic error saying, error processing the payment. Please try to place an order again. Can anyone please suggest how to process an order using magento rest api through credit cards. Thank you.
2 Answers 2
Please try the below code.
"paymentMethod": {
"method": "custom_pay",
"additional_information": {
"cc_cid": "000",
"cc_type": "VI",
"cc_exp_year": "2017",
"cc_exp_month": "2",
"cc_number": "xxxxxxxxxxxxxxxx"
}
}
I hope it will be help you.
Anyone know how to go about determining the structure of the json to use for a different payment method (like authorize.net for example)?
-
Did you find any solution to this custom online payment integration?MSQ– MSQ2020年01月23日 05:53:00 +00:00Commented Jan 23, 2020 at 5:53