Copied to clipboard

Flag this post as spam?

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


  • Lars Heesakkers 38 posts 194 karma points
    Sep 27, 2022 @ 13:24
    Lars Heesakkers
    0

    Partial payment for Order

    Hello everyone,

    I have a webshop in which I have implemented Vendr with the Mollie Payment provider. It is possible in our webshop to only pay a percentage of the total orderprice. The remaining amount will be paid when the order is delivered to the customer (Vendr doesn't need to know this happened). When the Partial payment is done it is the final status for Vendr as if it was paid in whole.

    If I go to Mollie right now, it is always with the total order amount. But I need it to switch between the total order amount or the deposit amount based on what the customer chooses.

    Is this possible? Or do I need to make a custom Order price Calculator which changes the orderprice based on the chosen option?

    Any help is appreciated.

    ~Lars

  • Lars Heesakkers 38 posts 194 karma points
    Oct 17, 2022 @ 07:14
    Lars Heesakkers
    0

    Does anybody have any ideas?

    ~Lars

  • Kevin Meilander 78 posts 384 karma points c-trib
    Oct 17, 2022 @ 23:42
    Kevin Meilander
    0

    It sounds like you'll need some sort of custom logic to change how the payment works so you could maybe checkout the code for the payment provider:

    https://github.com/vendrhub/vendr-payment-provider-mollie/blob/v2/dev/src/Vendr.PaymentProviders.Mollie/MollieOneTimePaymentProvider.cs

    You don't say how the final payment would get handled if is not in vendr so I'm a little confused as to how that would get managed. I haven't worked with Mollie before, does it support this type of functionality?

    It feels like you would need to create 2 transactions for each order - one for the deposit that is captured at order time, and one that is captured and I'm not sure how a payment processor would handle this.

    Unfortunately, I know that Vendr doesn't support breaking up payments in the form of partial refunds yet, so I doubt it could do multiple payments yet either. So whatever solution you figure out would have to happen outside of vendr.

  • Lars Heesakkers 38 posts 194 karma points
    Oct 18, 2022 @ 05:45
    Lars Heesakkers
    0

    Hi Kevin,

    Thanks for your answer. I do not need to split the payments. There is always one payment as far as Vendr is concerned. The problem is that I need to change the order amount with which I am going to the payment provider based on the user's choice.

    ~Lars

  • Lars Heesakkers 38 posts 194 karma points
    Oct 19, 2022 @ 14:32
    Lars Heesakkers
    0

    I have found a way to get what I want by doing:

    order.Finalize(request.PaymentStyle == Models.Enums.PaymentStyle.Deposit ? order.TotalPrice.Value.WithTax * 0.2m : order.TotalPrice.Value.WithTax, Guid.NewGuid().ToString(), PaymentStatus.Authorized);
    

    The only problem is the that the orderstatus now has an error (402) so the orderconfirmation is not sent :( Not sure how I can convince Vendr that half a payment is enough.

    But I think this only "works" for invoicing.

    For now I am just going to create a 80% discount code which will be automatically redeemed, that seems to work OK.

    Any other tips or suggestions will be greatly appreciated.

    ~Lars

Please Sign in or register to post replies

Write your reply to:

Draft