active_merchant_pay2go 0.1.5 → 0.1.6

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: 0d0ec805a54b559acacc028454d76d5af1188c1a
4
- data.tar.gz: fea441eaafed8b3bbb849f6385240b65f4af972a
3
+ metadata.gz: 468cd8230ae4b28338e3560cf9c22878f13dd66d
4
+ data.tar.gz: cfa97ca9cd92f85e8e76f4a38e2d9ca62e63066f
5
5
  SHA512:
6
- metadata.gz: d9d4501b11c1a90c316aaadd9b305a63920281c963be06420ab44bd4ff3ef02d05ba7c702af680bd40375eb476439d5745c34611bb447c2568db3b8b18345fc3
7
- data.tar.gz: 766853f09055aba0ecb6ced5a22528db6b203640bceacd3cf8d0e4d979e30342eec15b74cff39a336854b84ef8f5b25f3705dfb871a3fb83004e8234a2070b8a
6
+ metadata.gz: 0dd6eb0e2ceceb241bb3951974c294bb2d85a0a76badd276c2de91c6c0eb9943e6bcdedeacd2a8b66567e841ce4e1771785a483f05b1db5f306e7bb43a1048c4
7
+ data.tar.gz: 15f870b8d587fc9f104116fe5db70000c36742309447c3d0361120bbf325094dd2a66a4d9b3b102b0dea19d8a614c285e4adbfb7044bf364da3bca8369e07a5e
data/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ = ActiveMerchantPay2go CHANGELOG
2
+
3
+ == Version 0.1.6 (Oct 8, 2016)
4
+ - update activemerchant version to from '~> 1.50' to '~> 1.60'
5
+ - update bundler version to from '~> 1.10' to '~> 1.13'
6
+ - update rake version to from '~> 10.0' to '~> 11.2'
7
+ - update rails version to from '>= 3.2.6', '< 5' to '>= 3.2.6', '< 6'
8
+ - Helper FIELDS: add ExpireTime
9
+ - Notification PARAMS_FIELDS: add RedAmt
10
+ - Notification PARAMS_FIELDS: add ExpireTime
data/README.md CHANGED
@@ -1,37 +1,41 @@
1
+ [![Gem Version](https://badge.fury.io/rb/active_merchant_pay2go.svg)](https://badge.fury.io/rb/active_merchant_pay2go)
1
2
  [![Build Status](https://travis-ci.org/imgarylai/active_merchant_pay2go.svg?branch=master)](https://travis-ci.org/imgarylai/active_merchant_pay2go)
2
3
  [![Code Climate](https://codeclimate.com/github/imgarylai/active_merchant_pay2go/badges/gpa.svg)](https://codeclimate.com/github/imgarylai/active_merchant_pay2go)
3
4
 
4
5
  # ActiveMerchantPay2go
5
6
 
6
- This gem integrate Rails with [pay2go(智付寶)](https://www.pay2go.com/).
7
+ [![Join the chat at https://gitter.im/imgarylai/active_merchant_pay2go](https://badges.gitter.im/imgarylai/active_merchant_pay2go.svg)](https://gitter.im/imgarylai/active_merchant_pay2go?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
7
8
 
8
- It was inspired by [active_merchant_allpay](https://github.com/xwaynec/active_merchant_allpay).
9
+ 這個 gem 的目的是要串接 [pay2go(智付寶)](https://www.pay2go.com/) 的金流,不過不是只有單純的 API 封裝,是透過 [active_merchant](https://github.com/activemerchant/active_merchant) 和 [offsite_payments](https://github.com/activemerchant/offsite_payments) 包裝後可以快速的在 Rails 上使用。
9
10
 
10
- ## Installation
11
+ 另外非常感謝 [active_merchant_allpay](https://github.com/xwaynec/active_merchant_allpay)。
11
12
 
12
- Add this line to your application's Gemfile:
13
+ ## 安裝
14
+
15
+ Gemfile 中加入這一行
13
16
 
14
17
  ```ruby
15
18
  gem 'active_merchant_pay2go'
16
19
  ```
17
20
 
18
- And then execute:
21
+ 透過 bundle 安裝:
19
22
 
20
23
  ```
21
24
  $ bundle
22
25
  ```
23
26
 
24
- ## Setup
27
+ ## 設定
25
28
 
26
- - I would suggest reading the [official API](https://www.pay2go.com/dw_files/info_api/pay2go_gateway_MPGapi_V1_1_4.pdf) first.
29
+ - 建議第一次使用的人可以先看一下官方的文件... [official API](https://www.pay2go.com/dw_files/info_api/pay2go_gateway_MPGapi_V1_1_8.pdf)
27
30
 
28
- - Create file `config/initializers/pay2go.rb`
31
+ - 建立 `config/initializers/pay2go.rb`
29
32
  ``` sh
30
33
  rails g pay2go:install
31
34
  ```
32
35
 
33
- - Go to Pay2go and get your credential information. Then fill in `config/initializers/pay2go.rb`
36
+ - 到智付寶上申請申請相關的 key 並放入 `config/initializers/pay2go.rb` 中。
34
37
  ```rb
38
+ # Example
35
39
  OffsitePayments::Integrations::Pay2go.setup do |pay2go|
36
40
  # You have to apply credential below by yourself.
37
41
  pay2go.merchant_id = '123456'
@@ -40,7 +44,7 @@ OffsitePayments::Integrations::Pay2go.setup do |pay2go|
40
44
  end
41
45
  ```
42
46
 
43
- - Environment configuration:
47
+ - 環境設定:
44
48
  ```rb
45
49
  # config/environments/development.rb
46
50
  config.after_initialize do
@@ -54,9 +58,9 @@ config.after_initialize do
54
58
  end
55
59
  ```
56
60
 
57
- ## Example
61
+ ## 範例
58
62
 
59
- ```
63
+ ```erb
60
64
  <% payment_service_for @order,
61
65
  @order.user.email,
62
66
  service: :pay2go,
@@ -71,12 +75,11 @@ end
71
75
  <%= submit_tag '付款' %>
72
76
  <% end %>
73
77
  ```
74
- This example code only fulfill the min requirements.
78
+ 這段程式碼只有實做了很基本的功能。
75
79
 
76
- To customize settings, you should read the documents.
77
- I put some comments in the [code](https://github.com/imgarylai/active_merchant_pay2go/blob/master/lib/offsite_payments/integrations/pay2go.rb) as well!
80
+ 如果有更多的設定,建議看一下官方文件有沒有支援。
78
81
 
79
- Here is an [example app](https://github.com/imgarylai/rails_active_merchant_pay2go) though it is really rough.
82
+ [範例](https://github.com/imgarylai/rails_active_merchant_pay2go) (很簡陋的範例).
80
83
 
81
84
  ## Contributing
82
85
 
@@ -19,11 +19,11 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency 'activemerchant', '~> 1.50'
22
+ spec.add_dependency 'activemerchant', '~> 1.60'
23
23
  spec.add_dependency 'offsite_payments', '~> 2'
24
24
 
25
- spec.add_development_dependency 'bundler', '~> 1.10'
26
- spec.add_development_dependency 'rake', '~> 10.0'
27
- spec.add_development_dependency 'rails', '>= 3.2.6', '< 5'
25
+ spec.add_development_dependency 'bundler', '~> 1.13'
26
+ spec.add_development_dependency 'rake', '~> 11.2'
27
+ spec.add_development_dependency 'rails', '>= 3.2.6', '< 6'
28
28
 
29
29
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveMerchantPay2go
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -6,7 +6,7 @@ module OffsitePayments #:nodoc:
6
6
  module Pay2go
7
7
  class Helper < OffsitePayments::Helper
8
8
  FIELDS = %w(
9
- MerchantID LangType MerchantOrderNo Amt ItemDesc TradeLimit ExpireDate ReturnURL NotifyURL CustomerURL ClientBackURL Email EmailModify LoginType OrderComment CREDIT CreditRed InstFlag UNIONPAY WEBATM VACC CVS BARCODE CUSTOM TokenTerm
9
+ MerchantID LangType MerchantOrderNo Amt ItemDesc TradeLimit ExpireDate ExpireTime ReturnURL NotifyURL CustomerURL ClientBackURL Email EmailModify LoginType OrderComment CREDIT CreditRed InstFlag UNIONPAY WEBATM VACC CVS BARCODE CUSTOM TokenTerm
10
10
  )
11
11
 
12
12
  FIELDS.each do |field|
@@ -7,8 +7,8 @@ module OffsitePayments #:nodoc:
7
7
  class Notification < OffsitePayments::Notification
8
8
  PARAMS_FIELDS = %w(
9
9
  Status Message MerchantID Amt TradeNo MerchantOrderNo PaymentType RespondType CheckCode PayTime IP
10
- EscrowBank TokenUseStatus RespondCode Auth Card6No Card4No Inst InstFirst InstEach ECI PayBankCode
11
- PayerAccount5Code CodeNo BankCode Barcode_1 Barcode_2 Barcode_3 ExpireDate CheckCode
10
+ EscrowBank TokenUseStatus RedAmt RespondCode Auth Card6No Card4No Inst InstFirst InstEach ECI PayBankCode
11
+ PayerAccount5Code CodeNo BankCode Barcode_1 Barcode_2 Barcode_3 ExpireDate ExpireTime CheckCode
12
12
  )
13
13
 
14
14
  PARAMS_FIELDS.each do |field|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_merchant_pay2go
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-05 00:00:00.000000000 Z
11
+ date: 2016-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.50'
19
+ version: '1.60'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.50'
26
+ version: '1.60'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: offsite_payments
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.10'
47
+ version: '1.13'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.10'
54
+ version: '1.13'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '11.2'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '11.2'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rails
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -75,7 +75,7 @@ dependencies:
75
75
  version: 3.2.6
76
76
  - - "<"
77
77
  - !ruby/object:Gem::Version
78
- version: '5'
78
+ version: '6'
79
79
  type: :development
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
@@ -85,7 +85,7 @@ dependencies:
85
85
  version: 3.2.6
86
86
  - - "<"
87
87
  - !ruby/object:Gem::Version
88
- version: '5'
88
+ version: '6'
89
89
  description: This gem integrate Rails with pay2go(智付寶).
90
90
  email:
91
91
  - garylai1990@gmail.com
@@ -95,6 +95,7 @@ extra_rdoc_files: []
95
95
  files:
96
96
  - ".gitignore"
97
97
  - ".travis.yml"
98
+ - CHANGELOG.md
98
99
  - CODE_OF_CONDUCT.md
99
100
  - Gemfile
100
101
  - LICENSE.txt