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