lib/fawry/requests/refund_request.rb in fawry-1.2.1 vs lib/fawry/requests/refund_request.rb in fawry-1.3.0

- old
+ new

@@ -36,14 +36,14 @@ signature: refund_request_signature }.compact end def fawry_merchant_code - ENV.fetch('FAWRY_MERCHANT_CODE') { request_params[:merchant_code] } + Fawry.configuration.fawry_merchant_code || ENV.fetch('FAWRY_MERCHANT_CODE') { request_params[:merchant_code] } end def fawry_secure_key - ENV.fetch('FAWRY_SECURE_KEY') { request_params[:fawry_secure_key] } + Fawry.configuration.fawry_secure_key || ENV.fetch('FAWRY_SECURE_KEY') { request_params[:fawry_secure_key] } end def validate_refund_params! contract = Contracts::RefundRequestContract.new.call(request_params) raise InvalidFawryRequestError, contract.errors.to_h if contract.failure?