Paypal Recurring Gem - 多个项目订阅

时间:2014-11-04 04:30:39

标签: ruby-on-rails ruby paypal recurring

我正在使用带有rails 3的Paypal重复宝石。

我有三种类型的订阅包和一些附加包,这样用户就可以订阅一些附加功能。

http://i.stack.imgur.com/cAMys.png

参考paypal重复出现的宝石,我找不到Paypal Line项目。我查看了Github上的代码,但我不确定如何修改源代码。

options = options.reverse_merge(
        token: @subscription.paypal_payment_token,
        description: @subscription.package_plan.description,
        payer_id: @subscription.paypal_customer_token,
        frequency: @subscription.package_plan.recurring_frequency,
        item_name: @subscription.package_plan.name,
        item_quantity: 1,
        item_amount: @subscription.package_plan.price * @subscription.package_plan.recurring_frequency,
        item_name: @subscription.package_add_ons.first.name,
        item_quantity: 1,
        item_amount: @subscription.package_add_ons.first.price * @subscription.package_plan.recurring_frequency,
        amount: @subscription.package_plan.price * @subscription.package_plan.recurring_frequency,
        currency: @subscription.package_plan.currency
    )

http://i.stack.imgur.com/4uRo1.png

0 个答案:

没有答案