ruby on rails - Paypal invalid token error when creating a recurring payment profile -


i trying setup recurring payment profile via expresscheckout api of paypal in ruby on rails of paypal-express gem keep getting error code 11502 (invalid token) => paypal error code documentation

the documentation bit unclear because there not saying what's missing:

one or more subscription detail fields missing request.

i have checked required field in documentation here don't think missed any. no need shipping details don't ship product. here log of being sent paypal when doing checkout , creating recurring profile:

setexpresscheckout

parameters:

{:returnurl=>"http://localhost:3000/paypal/validate", :cancelurl=>"http://localhost:3000/paypal/cancel", :reqconfirmshipping=>0, :noshipping=>1, :allownote=>0, :paymentrequest_0_amt=>"88.00", :paymentrequest_0_taxamt=>"0.00", :paymentrequest_0_shippingamt=>"0.00", :paymentrequest_0_currencycode=>"hkd", :paymentrequest_0_desc=>"plus x 2-month subscription x 2 staff", :localecode=>:fr}

response:

token=ec%2d0h440138vj9552235&timestamp=2015%2d04%2d25t08%3a38%3a42z&correlationid>=48742557da98&ack=success&version=88%2e0&build=16428450

createrecurringpaymentsprofile

parameters:

{:token=>"ec-0h440138vj9552235", :billingperiod=>:month, :billingfrequency=>2, :totalbillingcycles=>0, :amt=>"88.00", :currencycode=>"hkd", :shippingamt=>"0.00", :taxamt=>"0.00", :desc=>"plus x 2-month subscription x 2 staff", :maxfailedpayments=>0, :profilestartdate=>"2015-04-25 16:39:24"}

response:

timestamp=2015%2d04%2d25t08%3a39%3a26z&correlationid=533964ff183a1&ack=failure&ve>rsion=88%2e0&build=16398710&l_errorcode0=11502&l_shortmessage0=invalid%20token&l_>longmessage0=the %20token%20is%20invalid&l_severitycode0=error

do guys have ideas of wrong? can execute payment without issue, issue appear when creating recurring profile.

never mind! found wrong misread gem wiki (https://github.com/nov/paypal-express/wiki/recurring-payment) , mistakenly mix instant payment request recurring profile creation there no billing_agreement_description nor billing_agreements in data sent paypal...


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -