Ejemplo n.º 1
0
        internal async Task DoCheckAuth(string recordId)
        {
            Console.WriteLine($"Calling apiProvider.CheckAuthorization({recordId})");
            try
            {
                var response = await _apiProvider.CheckAuthorization(_providerConfig, recordId, 123.45m, string.Empty);

                Console.WriteLine($"{response.Description}");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Caught {ex}");
            }
            Console.WriteLine("Done");
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> TestBackEndApi()
        {
            PaymentProviderConfiguration providerConfig = new PaymentProviderConfiguration()
            {
                AccountIdentifer = _realExMerchantid,
                SharedSecret     = _realExSecretKey
            };

            try
            {
                var pmtAuthResponse = await _paymentProviderBackend.CheckAuthorization(
                    providerConfig,
                    _paymentProvider.GenerateUniqueIdentifier(),
                    1234,
                    string.Empty);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(Content("Success"));
        }