vtweb 0.0.6 → 0.0.7

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: 52bb961fae18ed6751a94b5a4c0317f062ac26e4
4
- data.tar.gz: 03b1c53165e2794626fb4d9025807f47a40bde49
3
+ metadata.gz: 72f7a529370d37292f2965846e5e807e48440e57
4
+ data.tar.gz: f3fb79c68b7cecd8b7c5f61c1f03411f0dec27a8
5
5
  SHA512:
6
- metadata.gz: ae311ca550269d2f55e8eb984cf739e5da9947cdb821a4bcc5e7b564eba73648398170485b3a88c9396a54e4b1f261acc88965a37287f6bf8c9e28e963b08dbe
7
- data.tar.gz: e4bbcece800ea22277f7fb4a477fa37f595258c7ccb291b8b3e4db1522dc81954c8af75f08a152a9b0db84eef800c826d0638efe01e6514c2681637fa15edde7
6
+ metadata.gz: 6f856294ede43a3a22340dd70df4f313afd7887507150b9efa1af765c5cf2f9bb793b2426b3e0916c428c0293a78178f9e82e9c0eb23c77cb69a1937488c6bcd
7
+ data.tar.gz: 74f0c8ba62dd8bec8a1c10f79abbb8d0386306c4718f9fe8761c7cc35d5afcf05d57b12dc8e5a97bedd7df8155a49d12394d95e76cafd45aed5c32ac9573f369
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Veritrans VT-Web Ruby Wrapper
1
+ # Veritrans VT-Web Ruby wrapper
2
2
 
3
- Ruby Wrapper for Veritrans VT-Web. Visit https://www.veritrans.co.id for more information about the product and see documentation at http://veritrans.github.io/vtweb/index.html for more technical details.
3
+ Ruby Wrapper for Veritrans VT-Web. Visit https://www.veritrans.co.id for more information about the product and see documentation at http://docs.veritrans.co.id/vtweb/index.html for more technical details.
4
4
 
5
5
  ## Installation
6
6
 
@@ -31,7 +31,7 @@ In your Rails app, create 'vtweb.yml' at config directory (config/vtweb.yml) wit
31
31
  production:
32
32
  merchant_id: "A100000000000001XXXXXX"
33
33
  merchant_hash_key: "yourmerchanthashkey"
34
- unfinish_payment_return_url: "http://yourweb.com/"
34
+ unfinish_payment_return_url: "http://yourweb.com/canceled"
35
35
  finish_payment_return_url: "http://yourweb.com/thank_you"
36
36
  error_payment_return_url: "http://yourweb.com/shop_again"
37
37
 
@@ -59,47 +59,44 @@ 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
- client.item = params["item"]
64
-
65
- client.billing_different_with_shipping = 1
66
- client.required_shipping_address = 1
67
-
68
- client.first_name = params[:shipping_first_name]
69
- client.last_name = params[:shipping_last_name]
70
- client.address1 = params[:shipping_address1]
71
- client.address2 = params[:shipping_address2]
72
- client.city = params[:shipping_city]
73
- client.country_code = "IDN"
74
- client.postal_code = params[:shipping_postal_code]
75
- client.phone = params[:shipping_phone]
76
-
77
- client.shipping_first_name = params[:shipping_first_name]
78
- client.shipping_last_name = params[:shipping_last_name]
79
- client.shipping_address1 = params[:shipping_address1]
80
- client.shipping_address2 = params[:shipping_address2]
81
- client.shipping_city = params[:shipping_city]
82
- client.shipping_country_code = "IDN"
83
- client.shipping_postal_code = params[:shipping_postal_code]
84
- client.shipping_phone = params[:shipping_phone]
62
+ client.gross_amount = Cart.select(:sub_total).sum(:sub_total).to_s
63
+ client.item = params["item"]
64
+ client.billing_different_with_shipping = 1
65
+ client.required_shipping_address = 1
66
+ client.first_name = params[:shipping_first_name]
67
+ client.last_name = params[:shipping_last_name]
68
+ client.address1 = params[:shipping_address1]
69
+ client.address2 = params[:shipping_address2]
70
+ client.city = params[:shipping_city]
71
+ client.country_code = "IDN"
72
+ client.postal_code = params[:shipping_postal_code]
73
+ client.phone = params[:shipping_phone]
74
+ client.shipping_first_name = params[:shipping_first_name]
75
+ client.shipping_last_name = params[:shipping_last_name]
76
+ client.shipping_address1 = params[:shipping_address1]
77
+ client.shipping_address2 = params[:shipping_address2]
78
+ client.shipping_city = params[:shipping_city]
79
+ client.shipping_country_code = "IDN"
80
+ client.shipping_postal_code = params[:shipping_postal_code]
81
+ client.shipping_phone = params[:shipping_phone]
82
+ client.email = params[:email]
85
83
 
86
- client.email = params[:email]
87
-
88
- client.promo_bins = ["4"]
89
- client.payment_type = '01'
90
- client.enable_3d_secure = 1
91
- client.installment_banks = ["bni","cimb","mandiri"]
92
- client.installment_terms = { bni: ['3','12','2'], cimb: ['3', '6', '12'] }
93
- client.point_banks = ["cimb","bni", "miun"]
94
- client.bank = 'bni'
95
- client.payment_methods = ["credit_card","mandiri_clickpay"]
84
+ # Payment Options
85
+ client.promo_bins = ['411111', '510510']
86
+ client.payment_type = '01' #deprecated
87
+ client.enable_3d_secure = 1
88
+ client.installment_banks = ['bni', 'cimb', 'mandiri']
89
+ client.installment_terms = { bni: ['3','12','2'], cimb: ['3', '6', '12'] }
90
+ client.point_banks = ['cimb', 'bni']
91
+ client.bank = 'bni'
92
+ client.payment_methods = ['credit_card', 'mandiri_clickpay']
96
93
 
97
94
  client.get_keys
98
95
  @client = client
99
96
  render :layout => 'application'
100
97
  end
101
98
 
102
- After you get TOKEN_BROWSER and TOKEN_MERCHANT, post merchant_id, order_id and TOKEN_BROWSER to redirection url of vtweb. This code is also taken from https://github.com/veritrans/veritrans-rails-sample-cart :
99
+ After you get TOKEN_BROWSER and TOKEN_MERCHANT, you have to send a http post request merchant_id, order_id and TOKEN_BROWSER to redirection url of vtweb. This code was also taken from https://github.com/veritrans/veritrans-rails-sample-cart :
103
100
 
104
101
  <h1 align="center">Confirm Purchase Items</h1>
105
102
 
@@ -108,7 +105,7 @@ After you get TOKEN_BROWSER and TOKEN_MERCHANT, post merchant_id, order_id and T
108
105
  <input type="hidden" name="order_id" value="<%= @client.order_id %>">
109
106
  <input type="hidden" name="token_browser" value="<%= @client.token["TOKEN_BROWSER"] %>">
110
107
  <table border="1" align="center" width="80%" cellpadding="10" bgcolor="#FFFFCC">
111
- <tr>
108
+ <tr>
112
109
  <th>Name</th>
113
110
  <th>Price</th>
114
111
  <th>Quantity</th>
@@ -117,7 +114,7 @@ After you get TOKEN_BROWSER and TOKEN_MERCHANT, post merchant_id, order_id and T
117
114
 
118
115
  <% for cart in @carts %>
119
116
  <tr>
120
- <td><%= cart.product.name %></td>
117
+ <td><%= cart.product.name %></td>
121
118
  <td><%= cart.product.price %></td>
122
119
  <td><%= cart.quantity %></td>
123
120
  <td><%= cart.sub_total %></td>
@@ -12,6 +12,7 @@ module Vtweb
12
12
 
13
13
  Payment =[
14
14
  :payment_type,
15
+ :gross_amount,
15
16
  :installment_type,
16
17
  :installment_banks,
17
18
  :installment_terms,
data/lib/vtweb/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vtweb
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
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.6
4
+ version: 0.0.7
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-20 00:00:00.000000000 Z
11
+ date: 2014-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable