figpay_gateway 1.0.1 → 1.0.3

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: 03aa3ece2a07c3c8357a821ae7132f426d662e5eaf4d83953742fc42edb35946
4
- data.tar.gz: 8c0ea4eaad5351909cef1f25a41ecebc92fa47b1bb3ba9bf2850dce07d30b104
3
+ metadata.gz: d59cba6b47a82b9e89b53596dfacbab9d878a5d4d9cea9d8203c7b86f16437ad
4
+ data.tar.gz: a1c7b968a83539aff97dd6ca9ecbcb036b7618ade945572ac6221a3c4aaf96ed
5
5
  SHA512:
6
- metadata.gz: 88183bb02b6029d9da56ae4ea077375a57e851bb7de00eeeebfe08284e16a4debeece51f624174e157b062a854f9084fbd0aab88f980c4343b593add65722b29
7
- data.tar.gz: ed560173896abfe6ea4de038b9d5ff880b45e12598bfc7f26a282936f88f80f10cf165bcbafd989e6fec612fec5637bebe8b223cd8df5a555234c86e49d54eef
6
+ metadata.gz: 38b028203836e1051721ea735c616c331632833cda9eb0f15e15d9b0fa73236db8d433eb1f6715c8c692db56b918b45e3381c5d30f6738d4a214520fb6c1e8f3
7
+ data.tar.gz: cc42df57043042e8daa71c4648d0698af797432390d8f00fb2df31f6fbc39c7ef7ac0355d4ec140ab8bccab6613d2b0f9b95b89dbad5acaf00a34eef3928f538
data/README.md CHANGED
@@ -86,6 +86,17 @@ The FigPay Gateway library is organized around three main API sets:
86
86
 
87
87
  Process credit card transactions including sales, authorizations, captures, and refunds.
88
88
 
89
+ #### Recommendation - use collect.js to tokenize cards client side
90
+
91
+ The payment gateway supports credit card tokenization via [Collect.js](https://figpay.transactiongateway.com//merchants/resources/integration/integration_portal.php#cjs_methodology). The benefit of this approach is that sensitive PCI information will be submitted directly to payment processor servers, they will return a token that you would send back to your servers, and reduce the PCI SAQ compliance requirements from SAQ-C or SAQ-D to SAQ-A. This greatly simplifies compliance, as no credit information would ever touch your logs or servers.
92
+
93
+ Test Token example: `00000000-000000-000000-000000000000`
94
+ This is tied to a test card: `Card: 4111111111111111, Expiration: October 2025, CVV: 999`
95
+
96
+ Usage, in all examples, rather than passing in `ccnumber` and `ccexp`, these can be updated to use the token obtained via Collect.js and passed in as a `payment_token` param instead.
97
+
98
+ There is a Test Public Key that can be used with Collect.js: `48r3R6-M39Jx5-467srN-VWVbD3`
99
+
89
100
  #### Create a Sale
90
101
 
91
102
  Process a direct sale (authorization and capture combined):
@@ -186,7 +197,7 @@ Retrieve transaction details:
186
197
 
187
198
  ```ruby
188
199
  details = FigpayGateway::Transaction.new.find(
189
- transactionid: '3261844010'
200
+ transaction_id: '3261844010'
190
201
  )
191
202
  ```
192
203
 
@@ -1,3 +1,3 @@
1
1
  module FigpayGateway
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -67,6 +67,9 @@ module NMIGateway
67
67
  query[:ccexp] = options[:ccexp] # FORMAT MMYY
68
68
  query[:cvv] = options[:cvv] # Recommended
69
69
 
70
+ # Payment Token
71
+ query[:payment_token] = options[:payment_token] # from Collect.js
72
+
70
73
  # Payment
71
74
  query[:amount] = options[:amount]
72
75
  query[:currency] = options[:currency] || 'USD'
@@ -83,7 +86,7 @@ module NMIGateway
83
86
  # Recurring Billing
84
87
  query[:recurring] = options[:recurring ] # add_subscription
85
88
  query[:plan_id] = options [:plan_id]
86
- query[:plan_name] = options [:plan_name]
89
+ query[:plan_name] = options [:plan_name]
87
90
  query[:plan_payments] = options [:plan_payments] # 0 until canceled
88
91
  query[:plan_amount] = options [:plan_amount]
89
92
  query[:day_frequency] = options [:day_frequency]
@@ -2,11 +2,15 @@ module NMIGateway
2
2
  class CustomerVault < Api
3
3
 
4
4
  # NMIGateway::CustomerVault.new.create ccnumber: '4111111111111111', ccexp: "0219", first_name: "John", last_name: "Doe"
5
+ # NMIGateway::CustomerVault.new.create payment_token: "00000000-000000-000000-000000000000", first_name: "John", last_name: "Doe"
5
6
  def create(options = {})
6
7
  query = set_query(options)
7
8
  query[:customer_vault] = 'add_customer'
8
-
9
- require_fields(:ccnumber, :ccexp)
9
+ if query[:payment_token]
10
+ require_fields(:payment_token, :first_name, :last_name)
11
+ else
12
+ require_fields(:ccnumber, :ccexp, :first_name, :last_name)
13
+ end
10
14
  post query
11
15
  end
12
16
 
@@ -65,7 +65,7 @@ module NMIGateway
65
65
  post query
66
66
  end
67
67
 
68
- # NMIGateway::Transaction.new.find transactionid: 3261844010
68
+ # NMIGateway::Transaction.new.find transaction_id: 3261844010
69
69
  def find(options = {})
70
70
  query = set_query(options)
71
71
  query[:report_type] ||= 'transaction'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: figpay_gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eggett