by
back

Debug ActiveMerchant::ResponseError in Activemerchant

Error-Message

ActiveMerchant::ResponseError :Failed with 500 Internal Server Error

Solution:
Log all traffic between your app and paypal to a file to get more information.

config/initializer/paypal.rb

ActiveMerchant::Billing::PaypalExpressGateway.wiredump_device = File.open("/tmp/paypal.log", "a+")  
ActiveMerchant::Billing::PaypalExpressGateway.wiredump_device.sync = true

Now you can look for the error in the file /tmp/paypal.log.

example error message:

...
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>Data type '' mismatch in element 'n2:Quantity'</faultstring>
...


comments powered by Disqus