Method: ActiveMerchant::Billing::PaypalRecurringApi#recurring
- Defined in:
- lib/active_merchant/billing/gateways/paypal/paypal_recurring_api.rb
#recurring(amount, credit_card, options = {}) ⇒ Object
Create a recurring payment.
This transaction creates a recurring payment profile
Parameters
-
amount
– The amount to be charged to the customer at each interval as an Integer value in cents. -
credit_card
– The CreditCard details for the transaction. -
options
– A hash of parameters.
Options
-
:period
– [Day, Week, SemiMonth, Month, Year] default: Month -
:frequency
– a number -
:cycles
– Limit to certain # of cycles (OPTIONAL) -
:start_date
– When does the charging starts (REQUIRED) -
:description
– The description to appear in the profile (REQUIRED)
27 28 29 30 31 32 33 34 |
# File 'lib/active_merchant/billing/gateways/paypal/paypal_recurring_api.rb', line 27 def recurring(amount, credit_card, = {}) ActiveMerchant.deprecated Gateway::RECURRING_DEPRECATION_MESSAGE [:credit_card] = credit_card [:amount] = amount requires!(, :description, :start_date, :period, :frequency, :amount) commit 'CreateRecurringPaymentsProfile', build_create_profile_request() end |