Azericard
Unoffical Ruby interface to AzeriCard online payment processing system.
Legal
This code is in no way affiliated with, authorised, maintained, sponsored or endorsed by AzeriCard LLC or any of its affiliates or subsidiaries. This is an independent and unofficial. Use at your own risk.
Installation
gem 'azericard'
# gem 'azericard', github: 'NARKOZ/azericard'
Configuration
Azericard.configure do |config|
config.endpoint = Settings.azericard.endpoint
config.terminal = Settings.azericard.terminal
config.secret_key = Settings.azericard.secret_key
config.merchant_name = Settings.azericard.merchant_name
config.merchant_email = Settings.azericard.merchant_email
config.merchant_url = Settings.azericard.merchant_url
config.country_code = Settings.azericard.country_code
config.gmt_offset = Settings.azericard.gmt_offset
end
Usage
# Payment authorization
= {
amount: @order.amount,
currency: @order.currency,
order: @order.number,
tr_type: 0,
desc: @order.description,
backref: azericard_callback_url
}
= Azericard::Request.()
p_sign = Azericard::Request.generate_mac(.text_to_sign)
# Checkout transaction
= {
amount: @order.amount,
currency: @order.currency,
order: @order.number,
tr_type: 21,
rrn: @order.payment.rrn,
intref: @order.payment.intref
}
= Azericard::Request.()
begin
Azericard::Request.process
rescue Azericard::Error => e
e.
end
Copyright
Copyright (c) 2013-2023 Nihad Abbasov