问题描述
我正在使用 paypal rest API 并将 paypal 与付款集成.
I am using the paypals rest API and integrating paypal with payments.
我设法使用以下代码创建了 Web 体验配置文件,但我无法运行此代码 2 次,它说配置文件已存在.
I manage to create the web experience profile with the following code, but i cant run this code 2 times, it says the profile already exists.
这是否意味着我必须创建一个配置文件并将其用于所有客户和所有交易?
does this mean that i have to create one profile and use it for all customers and all transactions ?
网络体验配置文件的有效期.
for how long a web experience profile is is valid for.
还是我必须更改配置文件名称并为每笔交易创建一个新配置文件?
or do i have to change the profile name and create a new profile for each transaction ?
curl -v POST https://api.sandbox.paypal.com/v1/payment-experience/web-profiles \
-H 'Content-Type:application/json' \
-H 'Authorization: Bearer <Access-Token>' \
-d '{
"name": "YeowZa! T-Shirt Shop",
"presentation": {
"brand_name": "YeowZa! Paypal",
"logo_image": "site",
"locale_code": "US"
},
"input_fields": {
"allow_note": true,
"no_shipping": 0,
"address_override": 1
},
"flow_config": {
"landing_page_type": "billing",
"bank_txn_pending_url": "site"
}
}'
推荐答案
没有为网络体验配置文件定义生命周期时间",除非您更新或删除配置文件
删除/v1/payment-experience/web-profiles/
将配置文件 ID 传递到每个付款请求的 JSON 负载中,
Pass the profile ID into the JSON payload for each payment request,
"experience_profile_id": "XP-CP6S-W9DY-96H8-MVN2"
重复使用个人资料,除非您需要不同的体验设置(允许运输/备注/徽标 img 等).
reuse the profile unless you need different experience settings (allow shipping / note / logo img, etc).
查看有关支付体验概述的更多详细信息
Check this out for more details on Payment Experience overview
这篇关于Paypal Payment REST API Web 体验配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!