Braintree payment processor integration

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Hi,
Has anyone successfully integration BrainTree payment processor (https://www.braintreepayments.com/developers) with NopCommerce?

Thanks
Nikhil Singhal
10 years ago
nikhilsinghal wrote:
Hi,
Has anyone successfully integration BrainTree payment processor (https://www.braintreepayments.com/developers) with NopCommerce?

Thanks
Nikhil Singhal


Any update on this?  I am also interested in BrainTree payments.  Did you ever make a plugin for this? Thanks!
9 years ago
I see its been a while, but just in case anyone else comes across this thread, here's a link to the Braintree plugin
9 years ago
The plugin is a very basic implementation of braintree which doesn't take advantage of the great features braintree comes with.

I'm currently in the process of extending this plugin to support more of those features, mainly based around subscriptions, free trials, and handling their notifications (webhooks).


One thing I just happened to come across today while implementing the support for free trials was there appears to be a missed call in the OrderProcessingService - line 918.

//skip payment workflow if order total equals zero
bool skipPaymentWorkflow = orderTotal.Value == decimal.Zero;



There is a virtual IsPaymentWorkflowRequired which I have overriden in my CustomCheckoutController :

[NonAction]
        protected override bool IsPaymentWorkflowRequired(IList<ShoppingCartItem> cart, bool ignoreRewardPoints = false)
        {
            bool result = true;

            if (cart.Any(i => i.Product.RequirePaymentInfo == true))
                return result;
            else
                return base.IsPaymentWorkflowRequired(cart, ignoreRewardPoints);
        }


The issue being that the line 918 in OrderProcessingService hard codes my ability to bypass the PaymentWorkflow.

My hope is that this would be changed to use another virtual or the same existing virtual to free us from the future version merge headaches.
9 years ago
One other place where a hardcode exists for bypassing payment info.

PaymentService

/// <summary>
        /// Process recurring payment
        /// </summary>
        /// <param name="processPaymentRequest">Payment info required for an order processing</param>
        /// <returns>Process payment result</returns>
        public virtual ProcessPaymentResult ProcessRecurringPayment(ProcessPaymentRequest processPaymentRequest)
        {
            // D360 edit
            //  && processPaymentRequest.RequirePaymentInfo == false

            if (processPaymentRequest.OrderTotal == decimal.Zero && processPaymentRequest.RequirePaymentInfo == false)
            {
                var result = new ProcessPaymentResult()
                {
                    NewPaymentStatus = PaymentStatus.Paid
                };
                return result;
            }
            else
            {
                var paymentMethod = LoadPaymentMethodBySystemName(processPaymentRequest.PaymentMethodSystemName);
                if (paymentMethod == null)
                    throw new NopException("Payment method couldn't be loaded");
                return paymentMethod.ProcessRecurringPayment(processPaymentRequest);
            }
        }
6 years ago
Hi
im trying to integrate Braintree plug in in our store
we put API keys in payment methods tab
Still we are nod able to make payments through this.
Any idea why?
Anywhere else should we put APIs?
Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.