Question

I am using paypal direct payment in rails application. I am integrated in live site, while purchasing the any item its showing error like,

A field was longer or shorter than the server allows

require 'rubygems'
            require 'active_merchant'
            ActiveMerchant::Billing::Base.mode = :production
            credit_card = ActiveMerchant::Billing::CreditCard.new(
            :number     => 'xxxxxxxxxxxxxxxxx',
            :month      => '3',
            :year       => '2018',
            :first_name => 'xxxxxx',
            :last_name  => 'xxxxxxx',
            :verification_value  => 'xxxxxx'
            )
            gateway = ActiveMerchant::Billing::PaypalGateway.new(
            :login => "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
            :password => "xxxxxxxxxxxxxxxx",
            :signature => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "
            )   
            response = gateway.authorize(1, credit_card, :ip => '127.1.1.1')

please give solution.

Was it helpful?

Solution

The only errors that are showing on your account is the following.

errorcode 10501
shortmessage "Invalid Configuration"
longmessage "This transaction cannot be processed due to an invalid merchant configuration."

This can be caused when you try to perform a DoDirectPayment API request and do not have Pro enabled on your account. It's possible that your software is translating that error into the field error that you are seeing. Please reach out to customer support if you wish to enable Pro on your account to be able to perform DoDirectPayment API calls.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top