Ejemplo n.º 1
0
        public async Task <AcquiringBankResult> SendToAcquiringBank(PaymentRequest request)
        {
            var piggyRequest = BuildPiggyRequest(request);
            var piggyStatus  = await ApiFunctions.ProcessPaymentRequestAsync(piggyRequest);

            return(BuildPaymentProcessed(piggyStatus));
        }
Ejemplo n.º 2
0
        public async Task <PaymentProcessed> ProcessAsync(IAcquirerCommand processPayment)
        {
            var piggyPayment = processPayment as ProcessPiggyPayment;

            if (piggyPayment == null)
            {
                throw new Exception("Invalid payment type");
            }
            var piggyRequest = BuildPiggyRequest(piggyPayment);
            var piggyStatus  = await ApiFunctions.ProcessPaymentRequestAsync(piggyRequest);

            return(BuildPaymentProcessed(piggyPayment, piggyStatus));
        }