Exemplo n.º 1
0
 /// <summary>
 /// Handles the PayPalExpressCheckoutController processed event.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The event arguments.
 /// </param>
 private void PayPalExpressControllerProcessed(PayPalExpressController sender, PaymentAttemptEventArgs<IPaymentResult> e)
 {
     var attempt = e.Entity;
     if (attempt.Payment.Success)
     {
         var email = attempt.Invoice.BillToEmail;
         Notification.Trigger("OrderConfirmation", new { email }, Topic.Notifications);
     }
 }
        /// <summary>
        /// Handles the StripePaymentController processed event.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The event arguments.
        /// </param>
        private void StripeControllerProcessed(StripePaymentController sender, PaymentAttemptEventArgs <IPaymentResult> e)
        {
            //    var attempt = e.Entity;
            //    if (attempt.Payment.Success)
            //    {
            //        var email = attempt.Invoice.BillToEmail;

            //        LogHelper.Info<UmbracoEventHandler>(string.Format("Raising notification trigger for order no. {0}", attempt.Invoice.BillToEmail));

            //        Notification.Trigger("OrderConfirmation", attempt, new[] { attempt.Invoice.BillToEmail }, Topic.Notifications);
            //    }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Handles the StripePaymentController processed event.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The event arguments.
        /// </param>
        private void StripeControllerProcessed(StripePaymentController sender, PaymentAttemptEventArgs <IPaymentResult> e)
        {
            var attempt = e.Entity;

            if (attempt.Payment.Success)
            {
                var email = attempt.Invoice.BillToEmail;

                LogHelper.Info <StripeApplicationEventListener>(string.Format("Raising notification trigger for order no. {0}", attempt.Invoice.BillToEmail));

                Notification.Trigger("OrderConfirmation", attempt, new[] { attempt.Invoice.BillToEmail }, Topic.Notifications);
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Handles the authorize capture attempted event
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The payment attempt event args.
 /// </param>
 private void PaymentGatewayMethodBaseOnAuthorizeCaptureAttempted(PaymentGatewayMethodBase sender, PaymentAttemptEventArgs<IPaymentResult> e)
 {
     CreateOrder(e.Entity);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Handles the <see cref="PaymentGatewayMethodBase"/> Void Attempted
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The event args
 /// </param>
 private void PaymentGatewayMethodBaseOnVoidAttempted(PaymentGatewayMethodBase sender, PaymentAttemptEventArgs <IPaymentResult> e)
 {
     if (e.Entity.Payment.Success)
     {
         e.Entity.Payment.Result.AuditPaymentVoided();
     }
 }
Exemplo n.º 6
0
        /// <summary>
        /// Handles the PayPalExpressCheckoutController processed event.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The event arguments.
        /// </param>
        private void PayPalExpressControllerProcessed(PayPalExpressController sender, PaymentAttemptEventArgs <IPaymentResult> e)
        {
            var attempt = e.Entity;

            if (attempt.Payment.Success)
            {
                var email = attempt.Invoice.BillToEmail;
                Notification.Trigger("OrderConfirmation", new { email }, Topic.Notifications);
            }
        }
Exemplo n.º 7
0
 /// <summary>
 /// Handles the authorize capture attempted event
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The payment attempt event args.
 /// </param>
 private void PaymentGatewayMethodBaseOnAuthorizeCaptureAttempted(PaymentGatewayMethodBase sender, PaymentAttemptEventArgs <IPaymentResult> e)
 {
     CreateOrder(e.Entity);
 }
 /// <summary>
 /// Handles the <see cref="PaymentGatewayMethodBase"/> Void Attempted
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The event args
 /// </param>
 private void PaymentGatewayMethodBaseOnVoidAttempted(PaymentGatewayMethodBase sender, PaymentAttemptEventArgs<IPaymentResult> e)
 {
     if (e.Entity.Payment.Success) e.Entity.Payment.Result.AuditPaymentVoided();
 }
Exemplo n.º 9
0
 /// <summary>
 /// Handles the capture attempted event
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="paymentAttemptEventArgs">
 /// The payment attempt event args.
 /// </param>
 private void PaymentGatewayMethodBaseOnCaptureAttempted(PaymentGatewayMethodBase sender, PaymentAttemptEventArgs<IPaymentResult> paymentAttemptEventArgs)
 {
     CreateOrder(paymentAttemptEventArgs.Entity);
 }
Exemplo n.º 10
0
 /// <summary>
 /// Handles the capture attempted event
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="paymentAttemptEventArgs">
 /// The payment attempt event args.
 /// </param>
 private void PaymentGatewayMethodBaseOnCaptureAttempted(PaymentGatewayMethodBase sender, PaymentAttemptEventArgs <IPaymentResult> paymentAttemptEventArgs)
 {
     CreateOrder(paymentAttemptEventArgs.Entity);
 }