html - 如何使用脚本自定义 PayPal 按钮?
问题描述
我是 PayPal 集成和设置的新手,并尝试在以下脚本中自定义 PayPal 按钮。
<script src="https://www.paypal.com/sdk/js?client-id=sb"> // Required. Replace SB_CLIENT_ID with your sandbox client ID.
</script>
<div id="paypal-button-container"></div>
<script>
paypal.Buttons({
style: {
layout: 'horizontal',
color: 'gold',
shape: 'pill',
label: 'paypal'
},
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: '0.01'
}
}]
});
}
}).render('#paypal-button-container');
</script>
在他们的文档中,在我没有收到的按钮中发短信之前有一个 PayPal 图标,所以请您指导我为什么我没有收到它。
上述代码的输出
https://developer.paypal.com/docs/checkout/integration-features/customize-button/#layout
解决方案
在他们的文档中,在我没有收到的按钮中发短信之前有一个 PayPal 图标,所以请您指导我为什么我没有收到它。
该文档已过期。几个月前,第一个按钮 (PayPal) 不再包含徽标。
您正在看到当前和正确的行为。
推荐阅读
- c++ - C ++没有适当的默认构造函数我迷路了
- pyaudio - pyaudio 生成空白 .wav 文件
- excel - 如何编写代码以从选择选项按钮中隐藏表格
- sql - 删除重复记录
- python - 如何读取多个图像文件夹?
- docker - 在 Docker 和 Jenkins 中运行测试框架的步骤
- java - 在 sql 查询中出现意外的 Token 错误
- javascript - JavaScript - jQuery.Tabledit 不适用于特定的 url
- pandas - 在缺少拆分模式之前的第一部分时拆分字符串列
- c++ - 输出 'external/name/x/lib/lib.so' 不是使用 bazel make 创建的