Copied to clipboard

Flag this post as spam?

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


  • Craig Rowe 22 posts 175 karma points
    Nov 08, 2016 @ 09:59
    Craig Rowe
    0

    Merchello Simple Payment by invoice

    I don't know whether I'm just not finding the materials (occasionally 404's on pages like http://merchello.com/documentation/getting-started/how-to/Simple-Checkout-Process or forum posts that are later answered with 'this is now deprecated' such as 'sales preparation').

    https://merchello.readme.io/docs is great from an API reference pov but not from a 'guide to checkout' pov. And fast track seems like a great way to start from a base but if you just want to do something small scale/simple are there different resources/replacements for things like the above, presumably old, 'getting-started' documents on merchello.com?

    For example I'd like to, in code, add a few items to a basket and checkout with a delivery address (allowing the customer to pay by invoice later) using umbraco default members as customers. There's no basket packaging involved, no variants, no options. Is that a 'Cash' payment gateway just named 'Invoice' with some custom statuses? if it is is it just a few lines with CheckoutManager? what would they need to be?

    Any help or pointers would be hugely appreciated.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Nov 08, 2016 @ 17:00
    Rusty Swayne
    100

    Hi Craig,

    Sorry for the frustration with the documentation - it's something that we try to keep up, but as you can imagine are stretched really thin with our resources. We'd love community support in this effort =)

    In the pay for later scenario, you will no longer be in the CheckoutManager paradigm, but it's actually a bit easier than your making it out to be.

    One thing your going to have to ensure is that invoices created during the original checkout is that there is a customer association. This is typically done by having the customer log in before they checkout. That way when they come back to the site, you can provide them with their sales history (list of invoices).

    Invoices have statuses, where unpaid and partial paid invoices would be the ones you'd want collection payments against.

    To get a list of available payment methods, you would use the PaymentContext: MerchelloContext.Current.Gateway.Payments.GetPaymentGatewayMethods()

    After allowing your user to decide how they want to pay, you'll use the following with the key submitted from your payment selection form.

    MerchelloContext.Current.Gateway.Payments.GetPaymentGatewayMethodByKey([paymentMethodKey])

    To pay an invoice, there are a bunch of extension methods:

     // customer selects an invoice to pay from a list
     var invoice = MerchelloContext.Current.Services.InvoiceService.GetByKey(invoiceKey);
    
     var attempt = invoice.CapturePayment(paymentMethod, amount, [processorArgCollection (if needed by the provider e.g. credit card)]);
    
  • Craig Rowe 22 posts 175 karma points
    Nov 09, 2016 @ 08:50
    Craig Rowe
    0

    Hi Rusty,

    Thanks for this. I'm actually just relying on the backoffice add payment mechanisms for later payment and creating an invoice using the invoiceservice with no payments on it in my frontend checkout.

    One further question about shipping. I've tried ensuring my products are 'shippable' and that my default warehouse has an address and that I have a default shipment provider but I still can't:

    • Do anything with the backoffice shipments tab
    • Click 'fulfill' in the backoffice (it appears, and you can click it but nothing happens)
    • See the shipping address that I add to the checkoutManager.Customer during checkout

    From various sources I seem to need to do something with shipment rate quotes. Can you let me know what the minimum work is to be done during checkout to allow fulfilment via the backoffice? and secondly can the fulfilment and shipment pieces in the backoffice be performed manually e.g. without a cost via a shipment provider, just allowing a backoffice user to use the fulfilment labels as labels to some offline process?

    Thanks again in advance

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Nov 10, 2016 @ 14:02
    Rusty Swayne
    0

    Hi Craig,

    It sounds like you might need to setup a shipping rate table (assuming you are using the default provider). Have you added a country and then configured at least one rate table for the country you are trying to ship to?

  • Craig Rowe 22 posts 175 karma points
    Nov 10, 2016 @ 14:03
    Craig Rowe
    1

    Yes that did seem to be it, thanks for that.

Please Sign in or register to post replies

Write your reply to:

Draft