Ejemplo n.º 1
0
 /// <remarks/>
 public void refundWithDataAsync(PaymentRequest request, object userState) {
     if ((this.refundWithDataOperationCompleted == null)) {
         this.refundWithDataOperationCompleted = new System.Threading.SendOrPostCallback(this.OnrefundWithDataOperationCompleted);
     }
     this.InvokeAsync("refundWithData", new object[] {
                 request}, this.refundWithDataOperationCompleted, userState);
 }
Ejemplo n.º 2
0
        private PaymentRequest buildPaymentRequest()
        {
            try
            {
                var request = new PaymentRequest
                                  {
                                      merchantAccount = Globals.Instance.settings["AdyenMerchantAccount"],
                                      amount = new Amount {currency = payment.currency, value = payment.amount},
                                      reference = payment.paymentRef
                                  };

                if (payment.method == "ELV")
                {
                    request.elv = new ELV()
                    {
                        accountHolderName = payment.accountHolderName,//"Simon わくわく Hopper",
                        bankAccountNumber = payment.bankAccountNumber,
                        bankLocation = payment.bankLocation,
                        bankLocationId = payment.bankLocationId,
                        bankName = payment.bankName//"TestBank"
                    };

                 }
                else {// credit card

                        request.card = new Card
                                       {
                                           brand = payment.method.ToLower(),
                                           cvc = payment.cvs,
                                           expiryMonth = payment.expiryMonth,
                                           expiryYear = payment.expiryYear,
                                           holderName = payment.holder,
                                           number = payment.number
                                       };
                        }

                    request.recurring = new Recurring() {contract = "ONECLICK"};
                    request.shopperReference = payment.shopperRef;
                    request.shopperEmail = payment.shopperRef;

                return request;
            }
            catch (Exception exp)
            {
                log.Error(exp);
                throw;
            }
        }
Ejemplo n.º 3
0
 /// <remarks/>
 public void refundWithDataAsync(PaymentRequest request) {
     this.refundWithDataAsync(request, null);
 }
Ejemplo n.º 4
0
 /// <remarks/>
 public void checkFraudAsync(PaymentRequest paymentRequest, object userState) {
     if ((this.checkFraudOperationCompleted == null)) {
         this.checkFraudOperationCompleted = new System.Threading.SendOrPostCallback(this.OncheckFraudOperationCompleted);
     }
     this.InvokeAsync("checkFraud", new object[] {
                 paymentRequest}, this.checkFraudOperationCompleted, userState);
 }
Ejemplo n.º 5
0
 /// <remarks/>
 public void checkFraudAsync(PaymentRequest paymentRequest) {
     this.checkFraudAsync(paymentRequest, null);
 }
Ejemplo n.º 6
0
 /// <remarks/>
 public void authoriseAsync(PaymentRequest paymentRequest, object userState) {
     if ((this.authoriseOperationCompleted == null)) {
         this.authoriseOperationCompleted = new System.Threading.SendOrPostCallback(this.OnauthoriseOperationCompleted);
     }
     this.InvokeAsync("authorise", new object[] {
                 paymentRequest}, this.authoriseOperationCompleted, userState);
 }
Ejemplo n.º 7
0
 /// <remarks/>
 public void authoriseAsync(PaymentRequest paymentRequest) {
     this.authoriseAsync(paymentRequest, null);
 }