Documentation

Ucommerce includes full API reference documentation and lots of helpful articles to help you build your e-commerce site as effortlessly as possible.

Topics Payment Providers
v7.18

Payment providers in Sitefinity

In sitefinity the default implementations of all integrations between Ucommerce and payment gateway are not able to automatically redirect to payment gateways when calling

    var transactionLibrary = Ucommerce.Infrastructure.ObjectFactory.Instance.Resolve<ITransactionLibrary>();
    transactionLibrary.RequestPayments();
    
    

In order to fix this, a manual redirect needs to take place. During checkout, when you want the customer to be redirected, the following code can be put in place to do a proper redirect in a Sitefinity MVC context.

    
    var transactionLibrary = Ucommerce.Infrastructure.ObjectFactory.Instance.Resolve<ITransactionLibrary>();
    var basket = transactionLibrary.GetBasket(false);
    
    return Redirect(transactionLibrary.GetPaymentPageUrl(basket.Payments.First()));