| Module | ActiveMerchant::Billing::Integrations::Gestpay::Common |
| In: |
lib/active_merchant/billing/integrations/gestpay/common.rb
|
| VERSION | = | "2.0" |
| ENCRYPTION_PATH | = | "/CryptHTTPS/Encrypt.asp" |
| DECRYPTION_PATH | = | "/CryptHTTPS/Decrypt.asp" |
| DELIMITER | = | '*P1*' |
| CURRENCY_MAPPING | = | { 'EUR' => '242', 'ITL' => '18', 'BRL' => '234', 'USD' => '1', 'JPY' => '71', 'HKD' => '103' |
# File lib/active_merchant/billing/integrations/gestpay/common.rb, line 20
20: def parse_response(response)
21: case response
22: when /#cryptstring#(.*)#\/cryptstring#/, /#decryptstring#(.*)#\/decryptstring#/
23: $1
24: when /#error#(.*)#\/error#/
25: raise StandardError, "An error occurred retrieving the encrypted string from GestPay: #{$1}"
26: else
27: raise StandardError, "No response was received by GestPay"
28: end
29: end