使用前端反应本机开发示例应用程序,并使用磁电机 2.0 开发后端 下订单时遇到付款问题。
Here like i am passing the values and Url
XXXXXXXXXXXXXXXXX/rest/V1/carts/16/order
body passing like this :
{
"paymentMethod":{"method": "Cash On Delivery"}
}
问题有 :"message": "The requested Payment Method is not available.",
您是否启用了付款方式"货到付款"? 如果没有,请通过以下方式启用它:Stores > Configuration > Sales > Payment Methods > Cash On Delivery Payment > Enable = Yes
PS:请在上述步骤后清除相应的应用程序缓存。
此外,绑定参数是付款方式的代码,而不是其名称/描述。
PS:您应该能够在{{url}}/rest/V1/carts/mine/shipping-information
端点的输出中找到付款方式"代码"。
祝你好运!:)