fnando / paypal-recurring

PayPal Express Checkout API Client for recurring billing.
256 stars 124 forks source link

What is the difference between trial_length and trial_frequency? #37

Open HuckyDucky opened 9 years ago

HuckyDucky commented 9 years ago

I want to create a monthly subscription with a 5 month trial. Does this do the job?

ppr = PayPal::Recurring.new(
  token: paypal_payment_token,
  payer_id: paypal_customer_token,
  description: "#{plan.name} Monthly Subscription- Up to #{plan.listing_limit} listings for #{self.repository.name}.",
  amount: plan.amount,
  currency: "USD",
  period: :monthly,
  trial_length: 5,
  trial_period: :monthly,
  start_at: Time.now,
  failed: 1,
  outstanding: :next_billing
)
CarlosRoque commented 9 years ago

I would like to know the answer to this too

andersonDadario commented 9 years ago

More info here: https://developer.paypal.com/docs/classic/api/merchant/CreateRecurringPaymentsProfile_API_Operation_NVP/