【发布时间】:2020-10-16 12:38:47
【问题描述】:
我正在尝试在我的网站上集成 paypal 的智能按钮 api。这是代码:
paypal.Buttons({
createOrder: function(data, actions) {
// This function sets up the details of the transaction, including the amount and line item details.
return actions.order.create({
purchase_units: [{
amount: {
value: '10'
}
}]
});
}
}).render('#paypal-button-container');
我的价格变量是这样的:
var price = '100'
我尝试添加价格而不是“100”,但我不断收到未捕获的参考错误,告诉我它尚未定义。
【问题讨论】:
标签: javascript html paypal