Skip to content

Commit

Permalink
Support TOKEN payment type
Browse files Browse the repository at this point in the history
  • Loading branch information
Gal Tsubery committed Jun 21, 2018
1 parent 18b6056 commit bd55fb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Ruby/lib/kount/payment_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ module Kount
class PaymentTypes
# Credit card (VISA, MasterCard, Amercian Express, etc)
CREDIT_CARD = 'CARD'
#Generic Token
TOKEN = 'TOKEN'
# PayPal
PAYPAL = 'PYPL'
# Check
Expand Down
2 changes: 1 addition & 1 deletion Ruby/lib/kount/request/inquiry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def prepare_params(version, merchant_id, response_format, ksalt)
def fixup_payment_params(ksalt, merchant_id)
ptok = params[:PTOK]
case params[:PTYP]
when 'CARD'
when 'CARD', 'TOKEN'
ptok = Kount::SecurityMash.hash_credit_card(ptok, ksalt)
params.merge!(PTOK: ptok, PENC: 'KHASH')
when 'GIFT', 'OTHER'
Expand Down

0 comments on commit bd55fb0

Please sign in to comment.