Calling the Paypal rest api and get this java.lang.nullpointerexception error:
When initialising the call on Postman - it works fine
Where would this error be? In the body?
Here’s my body:
{
“intent”:“sale”,
“payer”:{
“payment_method”:“credit_card”,
“funding_instruments”:[
{
“credit_card”:{
“number”:“4532325401406798”,
“type”:“visa”,
“expire_month”:11,
“expire_year”:2018,
“cvv2”:“874”,
“first_name”:“Joe”,
“last_name”:“Shopper”,
“billing_address”:{
“line1”:“52 N Main ST”,
“city”:“Johnstown”,
“country_code”:“US”,
“postal_code”:“43210”,
“state”:“OH”
}
}
}
]
},
“transactions”:[
{
“amount”:{
“total”:“7.47”,
“currency”:“USD”,
“details”:{
“subtotal”:“7.41”,
“tax”:“0.03”,
“shipping”:“0.03”
}
},
“description”:“This is the payment transaction description.”
}
]
}