wordpress - 使用 Woocommerce rest api 退款 api 导致服务器错误 (500)
问题描述
这是 Woocommerce 提供的文档。 https://woocommerce.github.io/woocommerce-rest-api-docs/?javascript#create-a-refund
每当我点击退款时,它都会给我 500 的代码错误。
编码 :
export const addRefundAmountInOrder = (orderId) => async (dispatch) => {
let data = {
amount: "10.00",
};
try {
const res = await api.post(`orders/${orderId}/refunds`, data);
console.log(res.data, "refund response.....");
} catch (error) {
console.log(error)
}
};
解决方案
推荐阅读
- yii2 - 根据用户输入更新 swiftmailer 配置
- java - org.primefaces.model.menu.DefaultSubMenu 不能转换为 javax.faces.component.UIComponent
- arrays - 我想发送一个带有数组的 Postman POST 请求:成员:["william", "eric", "ryan"]
- python - 如何在张量流中进行花式索引
- r - Displaying a stacked bar plot with a condition
- javascript - For 循环迭代 - 复选框自动递增 no
- python - 如何从一组图像中显示像素随时间的变化?(随时间成像的亮度变化对象)
- mysql - MySQL获取每个产品组的列值最小的行
- python - 如何检查tensorflow是否使用整个内存ram
- python - 按钮自动调整大小