bancomer-active_merchant 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/active_merchant/bancomer/helper.rb +2 -1
- data/test/test_bancomer-active_merchant.rb +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "money"
|
1
2
|
module ActiveMerchant #:nodoc:
|
2
3
|
module Billing #:nodoc:
|
3
4
|
module Integrations #:nodoc:
|
@@ -11,6 +12,7 @@ module ActiveMerchant #:nodoc:
|
|
11
12
|
add_field('Ds_Merchant_Order', format_order_number(order))
|
12
13
|
add_field('Ds_Merchant_MerchantCode', account)
|
13
14
|
add_field('Ds_Merchant_Terminal', 1)
|
15
|
+
add_field('Ds_Merchant_Amount', options[:amount].to_money.cents)
|
14
16
|
end
|
15
17
|
|
16
18
|
# Limited to 12 digits max
|
@@ -38,7 +40,6 @@ module ActiveMerchant #:nodoc:
|
|
38
40
|
'Ds_Merchant_MerchantCode', 'Ds_Merchant_Currency',
|
39
41
|
'Ds_Merchant_TransactionType' ]
|
40
42
|
|
41
|
-
mapping :amount, 'Ds_Merchant_Amount'
|
42
43
|
mapping :notify_url, 'Ds_Merchant_MerchantURL'
|
43
44
|
mapping :return_url, 'Ds_Merchant_UrlOk'
|
44
45
|
mapping :cancel_return_url, 'Ds_Merchant_UrlKo'
|
@@ -12,7 +12,7 @@ class BancomerHelperTest < Test::Unit::TestCase
|
|
12
12
|
include ActiveMerchant::Billing::Integrations
|
13
13
|
|
14
14
|
def setup
|
15
|
-
@helper = Bancomer::Helper.new('R987654321','1234567', :amount =>
|
15
|
+
@helper = Bancomer::Helper.new('R987654321','1234567', :amount => 5.00)
|
16
16
|
@helper.sha1secret "mysecretsha1string"
|
17
17
|
@helper.return_url 'http://example.com/ok'
|
18
18
|
@helper.cancel_return_url 'http://example.com/cancel'
|