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

- old
+ new

@@ -34,14 +34,14 @@ signature: payment_status_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_payment_status_params! contract = Contracts::PaymentStatusRequestContract.new.call(request_params) raise InvalidFawryRequestError, contract.errors.to_h if contract.failure?