Exemple #1
0
        public static async Task <ClientResponse> CallClose(string payId)
        {
            var request = new PayReq()
            {
                MerchantId = MerchantId,
                DateTime   = $"{DateTime.Now:yyyyMMddHHmmss}",
                PayId      = payId
            };

            request.Signature = Crypto.Sign(request.ToSign(), Constants.PrivateKeyFilePath);

            return(await CreatePutRequest("payment/close", request));
        }
Exemple #2
0
        private static async Task <ClientResponse> CallPaymenProcess(string payId, string method)
        {
            var request = new PayReq()
            {
                MerchantId = MerchantId,
                DateTime   = $"{DateTime.Now:yyyyMMddHHmmss}",
                PayId      = payId
            };

            request.Signature = Crypto.Sign(request.ToSign(), Constants.PrivateKeyFilePath);

            return(await CreateGetRequest(method, request, true, (method != "payment/process")));
        }