Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Scott L 3 posts 73 karma points
    Jun 20, 2019 @ 17:09
    Scott L
    0

    Hi all,

    I'm trying to set up Ucommerce to use pay pal.

    There's only one item anyone can purchase.

    I've kind of skipped some parts and wanted to know if this would cause the error i'm getting.

    So after the basket page I have a method to go straight to paypal:

    public ActionResult ProcessPayment()
        {
    
            var country = TransactionLibrary.GetCountries().FirstOrDefault();
    
            var paymentMethod = TransactionLibrary.GetPaymentMethods(country).FirstOrDefault();
            var payment = TransactionLibrary.CreatePayment(
                paymentMethodId: paymentMethod.PaymentMethodId,
                requestPayment: true,
                amount: -1,
                overwriteExisting: true);
    
            TransactionLibrary.ExecuteBasketPipeline();
    
            var page = TransactionLibrary.GetPaymentPageUrl(payment);
    
            return Redirect(page);
        }
    

    Now after this runs I get the following error:

    enter image description here

    I haven't filled out billing address etc...

    Could this be the issue?

    Thanks!!!

Please Sign in or register to post replies

Write your reply to:

Draft