1

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 ************"}
    )
SethuNagaKarthik
  • 387
  • 1
  • 3
  • 17
  • Please share more details like the actual error that Rails is returning – zmanw Aug 30 '17 at 19:54
  • Hi zmanw, this is the response which i received from pay-pal response.ETHON: performed EASY effective_url=https://api.sandbox.paypal.com/v1/vault/credit-cards?number=5183330730754255&type=visa&expire_month=12&expire_year=2018&cvv2=123&first_name=Joe&last_name=Shopper&billing_address%5Bline1%5D=52%20N%20Main%20St.&billing_address%5Bcity%5D=Johnstown&billing_address%5Bcountry_code%5D=US&billing_address%5Bpostal_code%5D=43210&billing_address%5Bstate%5D=OH&billing_address%5Bphone%5D=408-334-8890&external_customer_id=nodedeveloper response_code=401 return_code=ok total_time=1.338686. – SethuNagaKarthik Aug 31 '17 at 07:00
  • In result.response_body am getting an error message as internal_server_error. I am not sure because of India pay-pal account, this may didn't work for me. – SethuNagaKarthik Aug 31 '17 at 07:03

0 Answers0