0
我是OpenAPI的新手,我需要一些幫助來創建PayPal的payment API的基本招搖檔案,以從我們的平臺創建支付。 注意:OAuth已配置。PayPal支付API的Swagger格式
下面是一個基本的招搖文件,但我不知道在哪裏添加paymet request information(即意圖,付款人,交易等)爲:
{
"swagger": "2.0",
"info": {
"description": "this is a payment request to through PayPal",
"title": "Swagger PayPal Payment",
"version": "1.0.0"
},
"host": "api.sandbox.paypal.com",
"basePath": "/v1/payments", //
"schemes": [ "https" ],
"paths": {
"/payment":
{
"post": {
"summary": "Creates a payment"
"description": "Creates a payment request to Paypal",
"parameters": {
},
//"intent": "sale",
//"payer":
//{
// "payment_method": "paypal"
//},
//"transactions": [
// {
// "amount": {
// "total": "9.00",
// "currency": "EUR"
// }
// }
//],
"responses": {
"200": {
"description": "OK"
}
}
}
}
}
}
測試上editor.swagger的文件,我得到交易,付款人和意圖上的「OBJECT_ADDITIONAL_PROPERTIES」錯誤。
有人爲PayPal API編寫了一個swagger格式文件嗎? – Jnr
看來RESTUnited是一個不錯的選擇。 – Jnr