You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use cancel method in authorize_net_cim.rb, when code into credit(nil, nil, response_code), it will always return => #<ActiveMerchant::Billing::Response:0x00007fde9655cdd8 @authorization=nil, @avs_result={"code"=>nil, "message"=>nil, "street_match"=>nil, "postal_match"=>nil}, @cvv_result={"code"=>nil, "message"=>nil}, @emv_authorization=nil, @error_code="E00003", @fraud_review=nil, @message= "The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:amount' element is invalid - The value '' is invalid according to its datatype 'Decimal' - The string '' is not a valid Decimal value.", @params= {"messages"=> {"result_code"=>"Error", "message"=> {"code"=>"E00003", "text"=> "The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:amount' element is invalid - The value '' is invalid according to its datatype 'Decimal' - The string '' is not a valid Decimal value."}}}, @success=false, @test=false>
The text was updated successfully, but these errors were encountered:
def credit(amount, creditcard, response_code, gateway_options = {})
create_transaction(amount, creditcard, :refund, transaction_options(gateway_options).merge(trans_id: response_code))
end
def void(response_code, creditcard, gateway_options = {})
create_transaction(nil, creditcard, :void, transaction_options(gateway_options).merge(trans_id: response_code))
end
def cancel(response_code)
response = void(response_code, nil)
response = credit(nil, nil, response_code) unless response.success?
response
end
We use cancel method in authorize_net_cim.rb, when code into credit(nil, nil, response_code), it will always return
=> #<ActiveMerchant::Billing::Response:0x00007fde9655cdd8 @authorization=nil, @avs_result={"code"=>nil, "message"=>nil, "street_match"=>nil, "postal_match"=>nil}, @cvv_result={"code"=>nil, "message"=>nil}, @emv_authorization=nil, @error_code="E00003", @fraud_review=nil, @message= "The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:amount' element is invalid - The value '' is invalid according to its datatype 'Decimal' - The string '' is not a valid Decimal value.", @params= {"messages"=> {"result_code"=>"Error", "message"=> {"code"=>"E00003", "text"=> "The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:amount' element is invalid - The value '' is invalid according to its datatype 'Decimal' - The string '' is not a valid Decimal value."}}}, @success=false, @test=false>
The text was updated successfully, but these errors were encountered: