コード例 #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);
 }
コード例 #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;
            }
        }
コード例 #3
0
 /// <remarks/>
 public void refundWithDataAsync(PaymentRequest request) {
     this.refundWithDataAsync(request, null);
 }
コード例 #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);
 }
コード例 #5
0
 /// <remarks/>
 public void checkFraudAsync(PaymentRequest paymentRequest) {
     this.checkFraudAsync(paymentRequest, null);
 }
コード例 #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);
 }
コード例 #7
0
 /// <remarks/>
 public void authoriseAsync(PaymentRequest paymentRequest) {
     this.authoriseAsync(paymentRequest, null);
 }