Beispiel #1
0
        private bool CancelarSandbox()
        {
            var payment = new wsAdyenSandbox.Payment {
                Credentials = this.Credentials
            };
            var modificationRequest = new wsAdyenSandbox.ModificationRequest {
                originalReference = this.CodigoReferencia, merchantAccount = ConfiguracaoAdyen.Instancia.Chaves.MerchantAccount.Valor
            };

            var retorno = payment.cancelOrRefund(modificationRequest);

            var autorizado = AdyenStatic.Action.Autorizado(retorno.response);

            this.CodigoReferencia = retorno.pspReference;

            return(autorizado);
        }
Beispiel #2
0
        private bool CapturarSandbox()
        {
            var payment = new wsAdyenSandbox.Payment {
                Credentials = this.Credentials
            };
            var modificationRequest = new wsAdyenSandbox.ModificationRequest
            {
                merchantAccount    = ConfiguracaoAdyen.Instancia.Chaves.MerchantAccount.Valor,
                originalReference  = this.CodigoReferencia,
                modificationAmount = new wsAdyenSandbox.Amount
                {
                    currency = ConfiguracaoAdyen.Instancia.Chaves.Currency.Valor,
                    value    = ValorFormatado
                }
            };

            var retorno = payment.capture(modificationRequest);

            return(AdyenStatic.Action.Autorizado(retorno.response));
        }