我正在尝试建立一个贝宝Express实例,并将订单号从网站传递到贝宝交易中,这样客户端就有了一个引用。这就是他们以前的系统与express的工作方式,但是现在我们从头开始重建了这个站点,没有从Paypal找到任何关于自定义值的有用文档,甚至没有传递一个描述。
我尝试过PayPal Express Checkout.js-发送自定义参数,这两种解决方案对我的PayPal沙箱都没有任何作用。贝宝提供的通知只包括账户信息和支付金额,显然这是不对的?
我一直在离开这些文档:https://developer.paypal.com/demo/checkout/#/patter/client
<!DOCTYPE html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
</head>
<body>
<div id="paypal-button-container"></div>
<script>
paypal.Button.render({
env: 'sandbox', // sandbox | production
// PayPal Client IDs - replace with your own
// Create a PayPal app: https://developer.paypal.com/developer/applications/create
client: {
sandbox: 'AZDxjDScFpQtjWTOUtWKbyN_bDt4OgqaF4eYXlewfBP4-8aqX3PiV8e1GWU6liB2CUXlkA59kJXE7M6R',
production: '<insert production client id>'
},
// Show the buyer a 'Pay Now' button in the checkout flow
commit: true,
// payment() is called when the button is clicked
payment: function(data, actions) {
// Make a call to the REST api to create the payment
return actions.payment.create({
payment: {
transactions: [
{
amount: { total: '0.01', currency: 'USD' }
}
]
}
});
},
// onAuthorize() is called when the buyer approves the payment
onAuthorize: function(data, actions) {
// Make a call to the REST api to execute the payment
return actions.payment.execute().then(function() {
window.alert('Payment Complete!');
});
}
}, '#paypal-button-container');
</script>
</body>
能有人这么仁慈地把我引到正确的方向吗?我觉得我错过了一些简单的东西
我和paypal谈过,他们实际上没有关于这个的直接文档,他们仍然在为很多特性创建文档。
您可以在paypal提供的cURL调用示例中使用JSON数组
-d'{
"intent": "sale",
"payer": {
"payment_method": "paypal"
},
"transactions": [
{
"amount": {
"total": "30.11",
"currency": "USD",
"details": {
"subtotal": "30.00",
"tax": "0.07",
"shipping": "0.03",
"handling_fee": "1.00",
"shipping_discount": "-1.00",
"insurance": "0.01"
}
},
"description": "This is the payment transaction description.",
"custom": "EBAY_EMS_90048630024435",
"invoice_number": "48787589673",
"payment_options": {
"allowed_payment_method": "INSTANT_FUNDING_SOURCE"
},
"soft_descriptor": "ECHI5786786",
"item_list": {
"items": [
{
"name": "hat",
"description": "Brown color hat",
"quantity": "5",
"price": "3",
"tax": "0.01",
"sku": "1",
"currency": "USD"
},
{
"name": "handbag",
"description": "Black color hand bag",
"quantity": "1",
"price": "15",
"tax": "0.02",
"sku": "product34",
"currency": "USD"
}
],
"shipping_address": {
"recipient_name": "Hello World",
"line1": "4thFloor",
"line2": "unit#34",
"city": "SAn Jose",
"country_code": "US",
"postal_code": "95131",
"phone": "011862212345678",
"state": "CA"
}
}
}
],
"note_to_payer": "Contact us for any questions on your order.",
"redirect_urls": {
"return_url": "https://example.com",
"cancel_url": "https://example.com"
}
}'
因此对于“description”:“brown color hat”,
transactions: [
{
amount: { total: $paying, currency: 'CAD' },
description: 'This is a test description',
}
]
我已经在ado板上创建了一个自定义字段,现在我想用REST API传递值给它,pls让我知道如果这是可能的?如果是,如何?请看下面的屏幕截图中的一个例子 如何通过REST API将值传递到屏幕快照中突出显示的自定义域
如何将属性传递给gradle自定义任务?在ant中,它将如下所示: 在格拉德尔怎么做? 属性名称和版本是必需的,用户需要将它们传递给任务。
项目配置为使用多个MongoTemplate Mongo Ref传递为 问题:我需要访问MongoTemplate,它是类似的标准存储库。 例如,如果正在将接口扩展为 MyRepoCustomImpl 问题:相反,难道没有任何方法可以让要使用的MongoTemplate根据它扩展到的Repo自动注入或解析吗?
如果我将MyPipelineOptions更改为PipelineOptions,错误就消失了,但是如果我试图在函数中强制转换回MyPipelineOptions,我会得到一个ClassCastException,所以我猜这不是正确的方法...知道如何将自定义选项类传递给元素处理器吗? 下面是代码结构: 注意文档只显示了一个非自定义PipelineOptions的示例: PipelineOption
我想将自定义属性传递到我的Redux表单字段。文件中说: 传递给字段的任何自定义道具都将与输入和元对象合并到同一级别的道具对象中。 但将自定义道具传递给字段组件将引发编译错误: 类型“”的属性“myProp”不存在 在props属性中,我只能添加一组预定义的属性,如占位符或类型。传递另一个道具将抛出此错误: 键入“{name:“E-Mail”;组件:(props:any)= 是否有可能将自定义道具