forked from nov/paypal-express
-
Notifications
You must be signed in to change notification settings - Fork 21
Debugging
Ian Fleeton edited this page Jun 12, 2017
·
5 revisions
Call Paypal.sandbox!
at first.
Since all request/response is via SSL, you can’t use usual TCP tracking tools like tcpflow.
If you need to do so, this code will help you.
In this code,
-
method
is RPC method (SetExpressCheckout etc.), not HTTP method. -
params
is request body parameters except forMETHOD
parameter. -
response
is response body parameters.
module Paypal
module NVP
module Debugger
def post(method, params = {})
response = super
puts <<-DEBUG
#{method}
==========
#{params.to_query}
----------
#{response}
==========
DEBUG
response
end
end
class Request
prepend Debugger
end
end
end