12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using SinochemPosClient;
- using SinochemPosClient.Models;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace TestSinochemPosClient
- {
- public class TestNormalCases
- {
- private const string UrlPrefix = "http://10.26.5.59:8082/self_terminal_fj";
- private const string TrxNotifyApi = "/pay/iotNotify";
- public static void TestTrxNotificationToPos()
- {
- PosCommunicator<TrxNotificationRequest, TrxNotificationResponse> communicator =
- new PosCommunicator<TrxNotificationRequest, TrxNotificationResponse>(UrlPrefix + TrxNotifyApi);
- TrxNotificationRequest request = new TrxNotificationRequest
- {
- ticketId = "1234567890",
- person = "pump",
- cardNo = "88881180010002895352",
- cardType = "1",
- oilName = "92#",
- units = 12.22,
- price = 6.43,
- totalAmount = 100.00,
- amount = 90,
- oilLiuShuiNo = "2018040307",
- gunNum = "4",
- oilTime = "22:30:21",
- cardDiscount = 10.00,
- promDiscount = 0.00,
- payMethod = "01",
- transId = "110000453687"
- };
- Console.WriteLine("before send " + request.GetType().ToString());
- communicator.SendRequest(request);
- Console.WriteLine("got response messasge code: " + communicator.Response.status);
- }
- }
- }
|