示例#1
0
文件: Adyen.cs 项目: icaroferj/ir-api
        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);
        }
示例#2
0
文件: Adyen.cs 项目: icaroferj/ir-api
        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));
        }