Exemplo n.º 1
0
 public void refundPayment()
 {
     log.Info("Cancelling payment");
     var cancelRequest = new adyen.ModificationRequest();
     var adyenAmount = new adyen.Amount() { currency = "EUR", value = payment.amount };
     cancelRequest.modificationAmount = adyenAmount;
     cancelRequest.originalReference = payment.transactionId;
     cancelRequest.merchantAccount = Globals.Instance.settings["AdyenMerchantAccount"];
     var result = paymentEndPoint.refund(cancelRequest);
     var paymentResult = new adyen.PaymentResult { resultCode = "REFUND", pspReference = result.pspReference };
     CreatePaymentNotice.createSave(payment, paymentResult);
 }
Exemplo n.º 2
0
 public void cancelPayment()
 {
     log.Info("Cancelling payment");
     var cancelRequest = new adyen.ModificationRequest
         {
             originalReference = payment.transactionId,
             merchantAccount = Globals.Instance.settings["AdyenMerchantAccount"]
         };
     var result = paymentEndPoint.cancel(cancelRequest);
     var paymentResult = new adyen.PaymentResult{resultCode = "CANCELLATION", pspReference = result.pspReference};
     CreatePaymentNotice.createSave(payment, paymentResult);
 }
Exemplo n.º 3
0
 /// <remarks/>
 public void refundAsync(ModificationRequest modificationRequest, object userState) {
     if ((this.refundOperationCompleted == null)) {
         this.refundOperationCompleted = new System.Threading.SendOrPostCallback(this.OnrefundOperationCompleted);
     }
     this.InvokeAsync("refund", new object[] {
                 modificationRequest}, this.refundOperationCompleted, userState);
 }
Exemplo n.º 4
0
 /// <remarks/>
 public void refundAsync(ModificationRequest modificationRequest) {
     this.refundAsync(modificationRequest, null);
 }
Exemplo n.º 5
0
 /// <remarks/>
 public void captureAsync(ModificationRequest modificationRequest) {
     this.captureAsync(modificationRequest, null);
 }
Exemplo n.º 6
0
 /// <remarks/>
 public void cancelOrRefundAsync(ModificationRequest modificationRequest) {
     this.cancelOrRefundAsync(modificationRequest, null);
 }
Exemplo n.º 7
0
 /// <remarks/>
 public void authoriseReferralAsync(ModificationRequest modificationRequest, object userState) {
     if ((this.authoriseReferralOperationCompleted == null)) {
         this.authoriseReferralOperationCompleted = new System.Threading.SendOrPostCallback(this.OnauthoriseReferralOperationCompleted);
     }
     this.InvokeAsync("authoriseReferral", new object[] {
                 modificationRequest}, this.authoriseReferralOperationCompleted, userState);
 }
Exemplo n.º 8
0
 /// <remarks/>
 public void authoriseReferralAsync(ModificationRequest modificationRequest) {
     this.authoriseReferralAsync(modificationRequest, null);
 }