vtweb 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -2
- data/lib/vtweb.rb +3 -4
- data/lib/vtweb/config.rb +0 -1
- data/lib/vtweb/merchant_hash_generator.rb +2 -2
- data/lib/vtweb/post_params.rb +3 -5
- data/lib/vtweb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50fbd8f67ff090a2e66794d5e0fae91c04114606
|
4
|
+
data.tar.gz: 56d021dbeb8f516f5a44ab47aba946ced09c8e4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7559565e541cbc75f05b084c831bb4649fb5f0256df8ae72c2bbdfb515aa0a0438716764ab94840c870c6d23babac928d89effca72b7c634c40b4e9e343cddd
|
7
|
+
data.tar.gz: a4e88d5357c5a552572b1b1060ba5544265c683107bff0d31cba96b453a0e3ec1c93592b9bba8bd7dd1307768ccfaeed919ec6b86d7cd4486832fc14629ab3d3
|
data/README.md
CHANGED
@@ -59,7 +59,6 @@ In your controller, create a method to use the gem. I took the code from https:/
|
|
59
59
|
"item_name1" => item.product.name, "item_name2" => item.product.name }
|
60
60
|
end
|
61
61
|
|
62
|
-
client.gross_amount = Cart.select(:sub_total).sum(:sub_total).to_s
|
63
62
|
client.item = params["item"]
|
64
63
|
client.billing_different_with_shipping = 1
|
65
64
|
client.required_shipping_address = 1
|
@@ -83,7 +82,6 @@ In your controller, create a method to use the gem. I took the code from https:/
|
|
83
82
|
|
84
83
|
# Payment Options
|
85
84
|
client.promo_bins = ['411111', '510510']
|
86
|
-
client.payment_type = '01' #deprecated
|
87
85
|
client.enable_3d_secure = 1
|
88
86
|
client.installment_banks = ['bni', 'cimb', 'mandiri']
|
89
87
|
client.installment_terms = { bni: ['3','12','2'], cimb: ['3', '6', '12'] }
|
data/lib/vtweb.rb
CHANGED
@@ -24,7 +24,6 @@ module Vtweb
|
|
24
24
|
end
|
25
25
|
|
26
26
|
self.billing_different_with_shipping = Config::BILLING_DIFFERENT_WITH_SHIPPING
|
27
|
-
self.payment_type = Config::PAYMENT_TYPE
|
28
27
|
end
|
29
28
|
|
30
29
|
def get_keys
|
@@ -166,14 +165,14 @@ module Vtweb
|
|
166
165
|
@required_shipping_address = flag
|
167
166
|
end
|
168
167
|
|
169
|
-
def
|
170
|
-
return
|
168
|
+
def version
|
169
|
+
return '1'
|
171
170
|
end
|
172
171
|
|
173
172
|
private
|
174
173
|
|
175
174
|
def merchanthash
|
176
|
-
return MerchantHashGenerator::generate(merchant_id, merchant_hash_key,
|
175
|
+
return MerchantHashGenerator::generate(merchant_id, merchant_hash_key, order_id);
|
177
176
|
end
|
178
177
|
|
179
178
|
def parse_body(body)
|
data/lib/vtweb/config.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Vtweb
|
2
2
|
module MerchantHashGenerator
|
3
|
-
def self.generate(merchant_id, merchant_hash_key,
|
4
|
-
Digest::SHA512.hexdigest("#{merchant_hash_key},#{merchant_id},#{
|
3
|
+
def self.generate(merchant_id, merchant_hash_key, order_id)
|
4
|
+
Digest::SHA512.hexdigest("#{merchant_hash_key},#{merchant_id},#{order_id}")
|
5
5
|
end
|
6
6
|
end
|
7
7
|
end
|
data/lib/vtweb/post_params.rb
CHANGED
@@ -10,9 +10,7 @@ module Vtweb
|
|
10
10
|
:error_payment_return_url
|
11
11
|
]
|
12
12
|
|
13
|
-
Payment =[
|
14
|
-
:payment_type,
|
15
|
-
:gross_amount,
|
13
|
+
Payment =[
|
16
14
|
:installment_type,
|
17
15
|
:installment_banks,
|
18
16
|
:installment_terms,
|
@@ -55,7 +53,7 @@ module Vtweb
|
|
55
53
|
|
56
54
|
OtherParams =[
|
57
55
|
:order_id,
|
58
|
-
:
|
56
|
+
:version
|
59
57
|
]
|
60
58
|
|
61
59
|
ServerParams =[
|
@@ -64,7 +62,7 @@ module Vtweb
|
|
64
62
|
:finish_payment_return_url,
|
65
63
|
:unfinish_payment_return_url,
|
66
64
|
:error_payment_return_url,
|
67
|
-
:
|
65
|
+
:version
|
68
66
|
]
|
69
67
|
|
70
68
|
AllParam = (Merchant + Payment + Personal + Shipping + Purchases + OtherParams) - ServerParams
|
data/lib/vtweb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vtweb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Panggi Libersa Jasri Akadol
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|