移除 PayPal REST API 中的配送选项
Posted
技术标签:
【中文标题】移除 PayPal REST API 中的配送选项【英文标题】:Remove shipping option in PayPal REST API 【发布时间】:2017-02-20 07:55:41 【问题描述】:我有一个问题,很长一段时间都无法解决。我正在实施 PayPal 快速结账,并且由于网站正在销售营销并且不需要运输选项,因此无法删除运输。我有这个带有配置的 JSON,从文档和其他一些帖子中,我应该将“no_shipping”属性实现为 1。但我找不到应该在哪里放置这条线。或者也许这是以不同的方式完成的。感谢任何形式的帮助。
$_SESSION['expressCheckoutPaymentData'] = '
"transactions":[
"amount":
"currency":"USD",
"total":"320",
"details":
"subtotal":"300"
,
"description":"creating a payment",
"item_list":
"items":[
"name":"Camera",
"quantity":"1",
"price":"300",
"sku":"1",
"currency":"USD"
]
],
"payer":
"payment_method":"paypal"
,
"intent":"sale",
"redirect_urls":
"cancel_url":"'.$cancelUrl.'",
"return_url":"'.$placeOrderUrl.'"
';
【问题讨论】:
PayPal REST API: how to do an immediate payment and without asking for shipping address的可能重复 【参考方案1】:试试这个:
$_SESSION['expressCheckoutPaymentData'] = '
"payment":
"transactions": [
"amount":
"currency": "USD",
"total": "320",
"details":
"subtotal": "300"
,
"description": "creating a payment",
"item_list":
"items": [
"name": "Camera",
"quantity": "1",
"price": "300",
"sku": "1",
"currency": "USD"
]
]
,
"experience":
"input_fields":
"no_shipping": 1
';
【讨论】:
以上是关于移除 PayPal REST API 中的配送选项的主要内容,如果未能解决你的问题,请参考以下文章
PayPal REST API - 优惠券/折扣代码(负数)