如何将此Paypal卷曲请求转换为ajax或角度请求?

时间:2015-12-30 18:28:01

标签: angularjs ajax curl paypal

我在curl中完成了Paypal请求。但是,我想使用AngularJS发送此请求。如何在AngularJS中重写此请求?或者我可以在AngularJS请求中使用curl吗?如果是这样,怎么样?

curl -v https://api.sandbox.paypal.com/v1/payments/payouts?sync_mode=true \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <Access-Token>" \
-d "{
"sender_batch_header": {
    "email_subject": "You have a payment"
},
"items": [
    {
        "recipient_type": "EMAIL",
        "amount": {
            "value": 12.34,
            "currency": "USD"
        },
        "receiver": "shirt-supplier-one@mail.com",
        "note": "Payment for recent T-Shirt delivery",
        "sender_item_id": "A123"
    }
]
}"

这是我的jsfiddle.net/dv9v4t61/4

的链接

0 个答案:

没有答案