Class: EZPaypal::Cart::RecurringProfile
- Inherits:
-
HashWithIndifferentAccess
- Object
- HashWithIndifferentAccess
- EZPaypal::Cart::RecurringProfile
- Defined in:
- lib/core/data.rb
Instance Method Summary (collapse)
-
- (RecurringProfile) initialize(profile)
constructor
Setup profile.
Constructor Details
- (RecurringProfile) initialize(profile)
Setup profile
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/core/data.rb', line 190 def initialize(profile) item = profile = { "TOKEN" => item["token"], "EMAIL" => item["email"], "CURRENCYCODE" => item["currency"] || "USD", "FAILEDINITAMTACTION" => "CancelOnFailure", #ContinueOnFailure / CancelOnFailure # Display details "L_PAYMENTREQUEST_0_ITEMCATEGORY0" => item["category"] || "Physical", "L_PAYMENTREQUEST_0_NAME0" => item["item_code"] || "", "L_PAYMENTREQUEST_0_AMT0" => item["unit_price"] || "0", "L_PAYMENTREQUEST_0_QTY0" => item["quantity"] || "0", # Profile details "DESC" => item["item_code"] || "", "AMT" => item["amount"] || "0", "QTY" => item["quantity"] || "0", "INITAMT" => item["initial_amount"] || "0", # Recurring details "PROFILESTARTDATE" => item["start_date"] || Time.now, "BILLINGFREQUENCY" => item["frequency"] || "1", "BILLINGPERIOD" => item["period"] || "Month", "TOTALBILLINGCYCLES" => item["cycles"] || "0" } self.merge!() end |