Copied to clipboard

Flag this post as spam?

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


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • John Walker 43 posts 66 karma points
    Oct 17, 2011 @ 21:15
    John Walker
    0

    CreatePayment not adding a payment

    Hi,

    I've been working on amending the xslt examples in the UCommerce starter kit, all has been going well apart from UpdatePayment section. My current code used for creating the payment is:

    @{
        int paymentMethodId = 0;
        int.TryParse(umbraco.library.RequestForm("paymentMethodInput"), out paymentMethodId);
    } 
    
    @*Check to see if a payment method is posted back*@ 
    @if (paymentMethodId != 0)
    {
        var result = UCommerce.Xslt.Library.CreatePayment(paymentMethodId);
        var pipelineResult = UCommerce.Xslt.Library.ExecuteBasketPipeline();
    }
            

    And on the next screen which shows as break down of the order

        <ul>
        @foreach (var pay in basket.PurchaseOrder.Payments)
        {
            <li>
            @pay.PaymentMethodName (@pay.TransactionId)
            </li>
        }
        </ul>

    I have seen this working so It has to be something I have done but after debugging everything seems to work absolutely fine, both the result and pipelineResult return success. Is there anything I could have missed that is making this now work?

    Thanks

    John

  • Søren Spelling Lund 1797 posts 2786 karma points
    Oct 21, 2011 @ 00:55
    Søren Spelling Lund
    0

    Hi John,

    You're doing it right. An issue was discovered in 2.0.5, which caused the payment to be saved, but not show up on the order until the subsequent page view. uCommerce 2.1 fixes this issue.

  • John Walker 43 posts 66 karma points
    Oct 21, 2011 @ 10:21
    John Walker
    0

    Hi Soren,

    Thanks for that I just un-installed verson 2.05 and updated to 2.10, added back in my edited pipelines and all seems to be working now.

     

    John

  • Søren Spelling Lund 1797 posts 2786 karma points
    Oct 21, 2011 @ 11:01
    Søren Spelling Lund
    0

    Perfect. Next time you can safely skip the uninstall step and just install the newer package on top of the existing one. uCommerce will figure out the upgrade for you.

  • John Walker 43 posts 66 karma points
    Oct 21, 2011 @ 11:02
    John Walker
    0

    Great yeah I wasn't totally sure which way to go about it but will just do that next time.

Please Sign in or register to post replies

Write your reply to:

Draft