focas-client 0.1.3 → 0.1.4

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
  SHA256:
3
- metadata.gz: 74330bb8c48da9e0697d4a6960d2deac6a3c5f1d157b8ac6b12109f1912e08e8
4
- data.tar.gz: ac10d85a495cd9527c79b728d81b73208af58b79c5ea175584065461599bea0f
3
+ metadata.gz: e8eaa764deded36176c987d6e4745d41bc22575972a84d1bd9cacd48744831cb
4
+ data.tar.gz: 920a967e3145c9a44862bd0d8b78550caf903157350d976d8ce2aeb29a720ce0
5
5
  SHA512:
6
- metadata.gz: 4d7de62c28c8a71929c5db46a8be26398f00046b920133d3529f637493a70d69a0f757e94d482d4d2d14664c8503b5f7aeda6ed46c80296e519d73035bb8f186
7
- data.tar.gz: 36056fa2f61e7f3c653834e3d47d0cf3953a92eaf5a7ee087f4194917b6518c0eec3b9684b6ff5bd20918a4f13e71cd47a18073ac5c40e0f249a259588c05cf8
6
+ metadata.gz: 67654996060afba1cb162628c4799871dca8298b5b4834f20356ca73aed8a915d849dd05c63fb0bf4083dcfbd06f6ef4108b9056e66474a2e0f9532f72af6b6d
7
+ data.tar.gz: 257bced906ad64453bb2b55f093de6fafc5195b738d9244ffd60bf3e239262209e01f22048aa22771c657474fdad7cd92d06d1d7cddb818ebfb4d300c6a2fa40
data/CHANGELOG.md CHANGED
@@ -1 +1 @@
1
- ## 0.1.3 (開發中)
1
+ ## 0.1.4 (開發中)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- focas-client (0.1.3)
4
+ focas-client (0.1.4)
5
5
  activesupport (>= 4.0)
6
6
 
7
7
  GEM
@@ -0,0 +1,40 @@
1
+ ## 刷卡成功 callback 範例
2
+
3
+ {
4
+ "errcode"=>"00",
5
+ "authCode"=>"AB1234",
6
+ "authRespTime"=>"20230502200708",
7
+ "lastPan4"=>"5101",
8
+ "amtExp"=>"0",
9
+ "xid"=>"xxx",
10
+ "errDesc"=>"",
11
+ "lidm"=>"xxx",
12
+ "authAmt"=>"5000",
13
+ "currency"=>"",
14
+ "merID"=>"xxx",
15
+ "cardBrand"=>"VISA",
16
+ "pan"=>"490706******5101",
17
+ "status"=>"0",
18
+ "controller"=>"xxx",
19
+ "action"=>"xxx"
20
+ }
21
+
22
+
23
+ ## 刷卡失敗 callback 範例
24
+
25
+ {
26
+ "errcode"=>"91",
27
+ "authCode"=>"",
28
+ "authRespTime"=>"20230503112403",
29
+ "lastPan4"=>"5101",
30
+ "amtExp"=>"0",
31
+ "xid"=>"xxx",
32
+ "errDesc"=>"%B1%C2%C5v%A5%A2%B1%D1", #(big5?)
33
+ "lidm"=>"xxx",
34
+ "authAmt"=>"10000",
35
+ "currency"=>"",
36
+ "merID"=>"xxx",
37
+ "cardBrand"=>"VISA",
38
+ "pan"=>"490706******5101",
39
+ "status"=>"8"
40
+ }
data/lib/focas/payment.rb CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'net/http'
4
4
  require 'json'
5
+ require 'digest'
5
6
 
6
7
  require_relative 'config'
7
8
  require_relative 'errors'
data/lib/focas/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Focas
4
- VERSION = '0.1.3'
4
+ VERSION = '0.1.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: focas-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lin (pct)
@@ -42,6 +42,7 @@ files:
42
42
  - Rakefile
43
43
  - bin/console
44
44
  - bin/setup
45
+ - doc/paid_status.md
45
46
  - focas-client.gemspec
46
47
  - lib/focas-client.rb
47
48
  - lib/focas/config.rb