ruby on rails - Payment plan is accepted and created, but $0 is sent instead of the amount due -


i using ruby on rails 4, , paypal rest sdk.

i've created plan (recurring) , agreement, , user agreed plan, , user has subscription plan.

the plan , agreement:

plan = paypal::sdk::rest::plan.new(   name: 'test month', description: 'test desc', type: 'infinite',   payment_definitions:     [       {         name: 'payment',         type: "regular",         frequency: 'month',         frequency_interval: 1, cycles: 0,         amount:           {currency: 'usd', value: '10'}       }     ],   merchant_preferences:     {       cancel_url: 'https://google.com/',       return_url: 'https://google.com/',       auto_bill_amount: 'yes'     }   )  plan.create plan.update(path: '/', op: 'replace', value: { state: 'active' })  agreement = paypal::sdk::rest::agreement.new(   name: 'test agreement',   description: 'agreement desc',   plan: {id: plan.id},   start_date: (datetime.current + 1.minute).to_s,   payer: {     payment_method: 'paypal'   } )  agreement.create  agreement.execute 

the user's subscription:

enter image description here

but payment (transaction) not created.

as can see amount sent $0, amount due each cycle $10.00.

why $0 sent, why amount due, $10, not sent?

thanks.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -