Module: Reapal::Api::Order::TenderSerialNoQuery
- Defined in:
- lib/reapal/api/order/tender_serial_no_query.rb
Instance Method Summary collapse
-
#tender_serial_no_query(serial_no, service_type) ⇒ Hash
4.1 流水号查询(API).
Instance Method Details
#tender_serial_no_query(serial_no, service_type) ⇒ Hash
4.1 流水号查询(API)
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/reapal/api/order/tender_serial_no_query.rb', line 24 def tender_serial_no_query(serial_no, service_type) service = case service_type.to_sym when :tender_finish 'reapal.trust.tenderFinishSQuery' when :tender_refund 'reapal.trust.tenderRefundSQuery' else nil end if service.nil? res[:result] = "F" res[:error_msg] = "参数 service_type 错误" return res end post_path = '/tender/rest.htm' params = { serialNo: serial_no, queryTime: Time.now.strftime('%Y-%m-%d %H:%M:%S') } res = operate_post(:query, service, params, post_path, Http::ErrorCode.tender_auth_query, ['0000']) if 'P' == res[:result] && ('0001' || '0003') == res[:data][:resultCode] res[:result] = 'F' end Reapal.logger.info res res end |