While payment using paypal it will return error

269 Views Asked by At

When i use this API "https://api.sandbox.paypal.com/v1/payments/payment" for get "approval_url".

It's give error like :

{"name":"VALIDATION_ERROR","details":[{"field":"redirect_urls","issue":"This field required when payment_method is 'paypal'"}],"message":"Invalid request

see details ","information_link":"https://developer.paypal.com/docs/api/payments/#errors","debug_id":"e48112ca1cd19"}

I already mention parameter. This is my array.

{  
    "intent":"sale",
    "experience_profile_id":"XP-AAAA-AAAA-AAAA-AAAA",
    "payer":{  
        "payment_method":"paypal"
    },
    "transactions":[  
        {  
            "amount":{  
                "total":"9.00",
                "currency":"EUR"
            }
        }
    ]
},
"redirect_urls":{  
    "return_url":"http://example.com/success",
    "cancel_url":"http:/example.com/error"
}

Please let me know what is the issue.

Thanks In Advance

0

There are 0 best solutions below