【发布时间】:2020-06-26 21:14:22
【问题描述】:
我在 PayU 上集成付款时遇到问题。 我不是高级程序员,但我想在我的网站上执行此操作。 我在 https://www.payu.pl/en 上创建了一个沙盒帐户。 我正在浏览论坛,但我仍然不明白。 首先我使用了这个代码:https://repl.it/@PayU/pop-up-widget。 但它可能是商店本身和网站的结合。
现在我可能必须使用此代码并从http://developers.payu.com/en/restapi.html#creating_new_order_api 创建订单
curl -X POST https://secure.snd.payu.com/api/v2_1/orders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer d9a4536e-62ba-4f60-8017-6053211d3f47" \
-d '{
"notifyUrl": "https://your.eshop.com/notify",
"customerIp": "127.0.0.1",
"merchantPosId": "300746",
"description": "RTV market",
"currencyCode": "PLN",
"totalAmount": "21000",
"buyer": {
"email": "john.doe@example.com",
"phone": "654111654",
"firstName": "John",
"lastName": "Doe",
"language": "pl"
},
"settings":{
"invoiceDisabled":"true"
},
"products": [
{
"name": "Wireless Mouse for Laptop",
"unitPrice": "15000",
"quantity": "1"
},
{
"name": "HDMI cable",
"unitPrice": "6000",
"quantity": "1"
}
]
}'
如果它是正确的代码,我该如何使用它? 将此文件保存为哪种格式? 如何运行此脚本。 我从来没有用过 curl 也不知道该怎么做。
【问题讨论】:
标签: php json rest payment payu