vtweb 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72f7a529370d37292f2965846e5e807e48440e57
4
- data.tar.gz: f3fb79c68b7cecd8b7c5f61c1f03411f0dec27a8
3
+ metadata.gz: 50fbd8f67ff090a2e66794d5e0fae91c04114606
4
+ data.tar.gz: 56d021dbeb8f516f5a44ab47aba946ced09c8e4d
5
5
  SHA512:
6
- metadata.gz: 6f856294ede43a3a22340dd70df4f313afd7887507150b9efa1af765c5cf2f9bb793b2426b3e0916c428c0293a78178f9e82e9c0eb23c77cb69a1937488c6bcd
7
- data.tar.gz: 74f0c8ba62dd8bec8a1c10f79abbb8d0386306c4718f9fe8761c7cc35d5afcf05d57b12dc8e5a97bedd7df8155a49d12394d95e76cafd45aed5c32ac9573f369
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'] }
@@ -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 new_api
170
- return true
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, payment_type, order_id);
175
+ return MerchantHashGenerator::generate(merchant_id, merchant_hash_key, order_id);
177
176
  end
178
177
 
179
178
  def parse_body(body)
@@ -11,7 +11,6 @@ module Vtweb
11
11
 
12
12
  # Params Config
13
13
  BILLING_DIFFERENT_WITH_SHIPPING = '0'
14
- PAYMENT_TYPE = "01"
15
14
 
16
15
  def Config.included(mod)
17
16
  class <<self
@@ -1,7 +1,7 @@
1
1
  module Vtweb
2
2
  module MerchantHashGenerator
3
- def self.generate(merchant_id, merchant_hash_key, payment_type, order_id)
4
- Digest::SHA512.hexdigest("#{merchant_hash_key},#{merchant_id},#{payment_type},#{order_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
@@ -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
- :new_api
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
- :new_api
65
+ :version
68
66
  ]
69
67
 
70
68
  AllParam = (Merchant + Payment + Personal + Shipping + Purchases + OtherParams) - ServerParams
@@ -1,3 +1,3 @@
1
1
  module Vtweb
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
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.7
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-27 00:00:00.000000000 Z
11
+ date: 2014-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable