smulube-activemerchant 1.7.1.3 → 1.7.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/lib/active_merchant/billing/gateways/payflow_nvp_uk.rb +40 -3
- data/lib/active_merchant/version.rb +1 -1
- metadata +4 -4
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
@@ -225,12 +225,18 @@ module ActiveMerchant #:nodoc:
|
|
225
225
|
# * <tt>:profile_id</tt> - If present then we are modifying an existing profile, and this :profile_id identifies the profile we want to amend. If not present then we are creating a new recurring payments profile.
|
226
226
|
# * <tt>:starting_at</tt> - Takes a Date, Time or string in MMDDYYYY format. The date must be in the future.
|
227
227
|
# * <tt>:name</tt> - The name of the customer to be billed. If omitted the name from the creditcard is used.
|
228
|
+
# * <tt>:billing_address</tt> - The billing address of the customer. Either :billing_address or :address must be present
|
229
|
+
# * <tt>:address</tt> - The address of the customer. Not required if :billing_address is present.
|
230
|
+
# * <tt>:shipping_address</tt> - Optional shipping address for the customer.
|
228
231
|
# * <tt>:periodicity</tt> - The frequency that the recurring payments will occur at. Can be one of: [:daily, :weekly, :biweekly (every 2 weeks), :semimonthly (twice every month), :quadweekly (once every 4 weeks), :monthly (every month on the same date as the first payment), :quarterly (every 3 months on the same date as the first payment), :semiyearly (every 6 months on the same date as the first payment), :yearly.
|
229
232
|
# * <tt>:payments</tt> - Integer value describing the number of payments to be made. If set to 0 then profile will continue until terminated
|
230
233
|
# * <tt>:comment<tt> - Optional description of the goods or service being purchased
|
231
234
|
# * <tt>:max_failed_payments</tt> - The number of payments that are allowed to fail before PayPal suspends the profile. Defaults to 0 which means PayPal will never suspend the profile until the term is completed. PayPal will keep attempting to process failed payments.
|
232
235
|
# * <tt>:currency</tt> - The currency of the transaction. If present must be one of { AUD, CAD, EUR, JPY, GBP or USD }. If omitted the default currency is used.
|
233
236
|
# * <tt>:description</tt> - The description of the profile. Required for the profile to be created successfully.
|
237
|
+
# * <tt>:optionaltrxamt</tt> - Optional initial transaction amount in cents.
|
238
|
+
# * <tt>:failedinitamtaction</tt> - What to action to perform if the initial transaction fails. Can be either :continue or :cancel. Defaults to :cancel.ContinueOnFailure or CancelOnFailure
|
239
|
+
# * <tt>:autobilloutstanding</tt> - Controls whether to automatically bill the outstanding balance amount in the next payment. Can be either :no_auto or :add_to_next. Defaults to :no_auto
|
234
240
|
def recurring(money, creditcard, options = {})
|
235
241
|
post = {}
|
236
242
|
add_creditcard(post, creditcard)
|
@@ -243,6 +249,29 @@ module ActiveMerchant #:nodoc:
|
|
243
249
|
commit(TRANSACTIONS[:recurring], money, post)
|
244
250
|
end
|
245
251
|
|
252
|
+
# Modify a recurring payments profile
|
253
|
+
#
|
254
|
+
# ==== Parameters
|
255
|
+
#
|
256
|
+
# * <tt>:profile_id</tt> - The profile_id of the profile we want to amend.
|
257
|
+
# * <tt>money</tt> - The amount that the recurring profile is to be set up for as an integer value in cents.
|
258
|
+
# * <tt>creditcard</tt> - The CreditCard object to be used as a funding source for the recurring profile.
|
259
|
+
# * <tt>options</tt> - A hash of parameters (some optional).
|
260
|
+
# * <tt>:name</tt> - The name of the customer to be billed. If omitted the name from the creditcard is used.
|
261
|
+
# * <tt>:billing_address</tt> - The billing address of the customer. Either :billing_address or :address must be present
|
262
|
+
# * <tt>:address</tt> - The address of the customer. Not required if :billing_address is present.
|
263
|
+
# * <tt>:shipping_address</tt> - Optional shipping address for the customer.
|
264
|
+
# * <tt>:periodicity</tt> - The frequency that the recurring payments will occur at. Can be one of: [:daily, :weekly, :biweekly (every 2 weeks), :semimonthly (twice every month), :quadweekly (once every 4 weeks), :monthly (every month on the same date as the first payment), :quarterly (every 3 months on the same date as the first payment), :semiyearly (every 6 months on the same date as the first payment), :yearly.
|
265
|
+
# * <tt>:payments</tt> - Integer value describing the number of payments to be made. If set to 0 then profile will continue until terminated
|
266
|
+
# * <tt>:comment<tt> - Optional description of the goods or service being purchased
|
267
|
+
# * <tt>:max_failed_payments</tt> - The number of payments that are allowed to fail before PayPal suspends the profile. Defaults to 0 which means PayPal will never suspend the profile until the term is completed. PayPal will keep attempting to process failed payments.
|
268
|
+
# * <tt>:currency</tt> - The currency of the transaction. If present must be one of { AUD, CAD, EUR, JPY, GBP or USD }. If omitted the default currency is used.
|
269
|
+
# * <tt>:description</tt> - The description of the profile. Required for the profile to be created successfully.
|
270
|
+
# * <tt>:autobilloutstanding</tt> - Controls whether to automatically bill the outstanding balance amount in the next payment. Can be either :no_auto or :add_to_next. Defaults to :no_auto
|
271
|
+
def modify_recurring(profile_id, money, creditcard, options = {})
|
272
|
+
recurring(money, creditcard, options.merge(:profile_id => profile_id))
|
273
|
+
end
|
274
|
+
|
246
275
|
# Inquire about the status of a previously created recurring profile.
|
247
276
|
#
|
248
277
|
# ==== Parameters
|
@@ -325,8 +354,17 @@ module ActiveMerchant #:nodoc:
|
|
325
354
|
post[:maxfailpayments] = options[:max_failed_payments] unless options[:max_failed_payments].nil?
|
326
355
|
post[:profilename] = (options[:name] || creditcard.name).to_s.slice(0,128) unless options[:name].nil? && creditcard.nil?
|
327
356
|
post[:desc] = options[:description] unless options[:description].nil?
|
328
|
-
post[:optionaltrxamt] = options[:optionaltrxamt] unless options[:optionaltrxamt].nil?
|
329
|
-
|
357
|
+
post[:optionaltrxamt] = amount(options[:optionaltrxamt]) unless options[:optionaltrxamt].nil?
|
358
|
+
if options[:failedinitamtaction].nil? || options[:failedinitamtaction] == :cancel
|
359
|
+
post[:failedinitamtaction] = "CancelOnFailure"
|
360
|
+
elsif options[:failedinitamtaction] == :continue
|
361
|
+
post[:failedinitamtaction] = "ContinueOnFailure"
|
362
|
+
end
|
363
|
+
if options[:autobilloutstanding].nil? || options[:autobilloutstanding] == :no_auto
|
364
|
+
post[:autobilloutamt] = "NoAutoBill"
|
365
|
+
elsif options[:autobilloutstanding] == :add_to_next
|
366
|
+
post[:autobilloutamt] = "AddToNextBilling"
|
367
|
+
end
|
330
368
|
end
|
331
369
|
|
332
370
|
def format_date(time)
|
@@ -401,4 +439,3 @@ module ActiveMerchant #:nodoc:
|
|
401
439
|
end
|
402
440
|
end
|
403
441
|
end
|
404
|
-
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smulube-activemerchant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 107
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 7
|
9
9
|
- 1
|
10
|
-
-
|
11
|
-
version: 1.7.1.
|
10
|
+
- 4
|
11
|
+
version: 1.7.1.4
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Tobias Luetke
|
@@ -37,7 +37,7 @@ cert_chain:
|
|
37
37
|
RGv1VYD5jSaHiQ==
|
38
38
|
-----END CERTIFICATE-----
|
39
39
|
|
40
|
-
date: 2010-09-
|
40
|
+
date: 2010-09-23 00:00:00 +01:00
|
41
41
|
default_executable:
|
42
42
|
dependencies:
|
43
43
|
- !ruby/object:Gem::Dependency
|
metadata.gz.sig
CHANGED
Binary file
|