paypal transaction history creates an extra recurring payment -
i'm using paypal recurring gem:
https://github.com/fnando/paypal-recurring
for ruby on rails application
here's selected portion of code:
def make_recurring process :request_payment if @plan create_units process :create_recurring_profile, period: @plan.recurring, amount: (@plan.price), frequency: 1, start_at: time.zone.now end end def process(action, options={}) not_recurring_amount = @cart.total_price not_recurring_amount += 19.95 if @plan #add activation price first payment options = options.reverse_merge( token: @order.paypal_payment_token, payer_id: @order.paypal_customer_token, description: "your product total below", amount: not_recurring_amount.round(2), currency: "usd" ) response = paypal::recurring.new(options).send(action) raise response.errors.inspect if response.errors.present? response end essentially, user buys product , gets charged 239.95. user buys plan product 1 time activation , gets charged 33.95. both 1 time payments. when buy plan, charged 14.95 recurring monthly charge airtime plan. seems work notice in paypal sandbox account recurring charge blank:

why blank charge happening?
it not actual charge, record of profile being created. have first create profile, before can charged. reflected in paypal account seeing.
Comments
Post a Comment