I am using pay-pal vault to store my users credit card. When am trying to store user credit card am getting internal server error with response code = 500. I have tried with different type of sample test cards, but still it is not working for me. Please save me from this issue.
credit_card = {
number: "5183330730754255",
type: "mastercard",
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",
phone: "408-334-8890"
},
external_customer_id: "nodedeveloper122"
}
result = Typhoeus.post(
'https://api.sandbox.paypal.com/v1/vault/credit-cards/',
:params => credit_card,
:headers => {"Content-Type" => "application/json", "Authorization" => "Bearer ************"}
)