Exemplo n.º 1
0
 public ExpressTokenResponse CreateExpressToken(TokenRequest tokenRequest)
 {
     using (MerchantExpressApiOperationsClient client = new MerchantExpressApiOperationsClient())
     {
         return(client.CreateExpressToken(GetRequest(tokenRequest)));
     }
 }
Exemplo n.º 2
0
 public TransactionSpecIdentifierResponse VoidTransaction()
 {
     using (MerchantExpressApiOperationsClient client = new MerchantExpressApiOperationsClient())
     {
         return(client.VoidTransaction(new TransactionSpecIdentifierRequest()
         {
         }));
     }
 }
Exemplo n.º 3
0
        public OperationResponse GetOperation(string merchantSalesID)
        {
            string dateTime = DateTime.Now.ToString("s");

            StringBuilder plainTextMessage = new StringBuilder();

            plainTextMessage.Append(dateTime);
            plainTextMessage.Append(merchantSalesID);
            plainTextMessage.Append(_signatureKey);

            using (MerchantExpressApiOperationsClient client = new MerchantExpressApiOperationsClient())
            {
                return(client.GetOperation(new OperationRequest()
                {
                    ApiKey = _apiKey,
                    MerchantSalesID = merchantSalesID,
                    RequestDateTime = dateTime,
                    Signature = ComputeHash(plainTextMessage.ToString())
                }));
            }
        }