| Class | ActiveMerchant::Billing::QuickpayGateway |
| In: |
lib/active_merchant/billing/gateways/quickpay.rb
|
| Parent: | Gateway |
| URL | = | 'https://secure.quickpay.dk/transaction.php' |
| TRANSACTIONS | = | { :authorization => '1100', :capture => '1220', :void => '1420', :credit => 'credit' |
| POS_CODES | = | { :mail => '100020100110', :phone => '100030100110', :internet => 'L00500L00130', :internet_secure => 'K00500K00130', :internet_edankort => 'KM0500R00130', :internet_recurring => 'K00540K00130' |
| MD5_CHECK_FIELDS | = | { :authorization => [:msgtype, :cardnumber, :amount, :expirationdate, :posc, :ordernum, :currency, :cvd, :merchant, :authtype, :reference, :transaction], :capture => [:msgtype, :amount, :merchant, :transaction], :void => [:msgtype, :merchant, :transaction], :credit => [:msgtype, :amount, :merchant, :transaction] |
| CURRENCIES | = | [ 'DKK', 'EUR', 'NOK', 'GBP', 'USD' ] |
| APPROVED | = | '000' |
The login is the QuickpayId The password is the md5checkword from the Quickpay admin interface
# File lib/active_merchant/billing/gateways/quickpay.rb, line 45
45: def initialize(options = {})
46: requires!(options, :login, :password)
47: @options = options
48: super
49: end
# File lib/active_merchant/billing/gateways/quickpay.rb, line 51
51: def authorize(money, creditcard, options = {})
52: post = {}
53:
54: add_amount(post, money, options)
55: add_creditcard(post, creditcard)
56: add_invoice(post, options)
57:
58: commit(:authorization, post)
59: end
# File lib/active_merchant/billing/gateways/quickpay.rb, line 66
66: def capture(money, authorization, options = {})
67: post = {}
68:
69: add_reference(post, authorization)
70: add_amount(post, money)
71:
72: commit(:capture, post)
73: end
# File lib/active_merchant/billing/gateways/quickpay.rb, line 83
83: def credit(money, identification, options = {})
84: post = {}
85:
86: add_amount(post, money)
87: add_reference(post, identification)
88:
89: commit(:credit, post)
90: end
# File lib/active_merchant/billing/gateways/quickpay.rb, line 61
61: def purchase(money, creditcard, options = {})
62: auth = authorize(money, creditcard, options)
63: auth.success? ? capture(money, auth.authorization) : auth
64: end