lib/reapal/api/user/contract_query.rb in reapal-0.9.9 vs lib/reapal/api/user/contract_query.rb in reapal-0.9.10

- old
+ new

@@ -31,14 +31,20 @@ def contract_query(onekey_com_contract_flow_id) service = 'reapal.trust.contractQuery' post_path = '/reagw/agreement/agreeApi.htm' params = { - orderNo: oneket_com_contract_flow_id, + orderNo: onekey_com_contract_flow_id, queryTime: Time.now.strftime('%Y-%m-%d %H:%M:%S'), } - operate_post(:query, service, params, post_path, Http::ErrorCode.contract_query, ['0000']) + res = operate_post(:query, service, params, post_path, Http::ErrorCode.contract_query, ['0000']) + + if 'P' == res[:result] && '0001' == res[:data][:resultCode] + res[:result] = 'F' + end + + res end end # module end end