Copied to clipboard

Flag this post as spam?

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


  • Kevin Meilander 78 posts 384 karma points c-trib
    Jun 01, 2022 @ 20:49
    Kevin Meilander
    0

    Whtat's the Vendr Validation Event for Refunds

    I'm trying to prevent Backoffice users from being able to issue a refund, but I'm not able to figure out which validation event I need to block.

    I tried ValidateOrderTransactionUpdate and it looks like this will block the transaction status update, however the refund still gets issued to the payment provider(I'm using Stripe). So the refund does get issue, the payment status just doesn't update in vendr order.

    I'm using Stripe 2.0.1 and Vendr 2.1.0.

    Is there a validation event I can use to prevent the RefundPayment call to Stripe?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jun 02, 2022 @ 07:52
    Matt Brailsford
    0

    Hey Kevin,

    Hmm, it looks like we don't actually have a validation event for this 🤔

    If you want to disable the ability to refund via the back office you can disable it in the payment provider settings

    enter image description here

    Unfortunately this all or nothing though so will apply for every user.

    I'll add this to our issue tracker to review adding some more validation events around refunds / captures etc

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jun 02, 2022 @ 08:37
    Matt Brailsford
    100

    Just to let you know, I've had a look at this and I've added some extra validation events ValidateCaptureOderPayment, ValidateCancelOderPayment and ValidateRefundOderPayment which you can intercept and prevent those actions from occuring.

    These are currently available in a v2.3.0-beta0025 on our unstable nuget feed if you want to try it https://nuget.outfield.digital/unstable/vendr/v3/index.json , otherwise it'll be released with Vendr v2.3.0 (likely after Umbraco v10 is launched).

    Untill then, the above post is your only option.

  • Kevin Meilander 78 posts 384 karma points c-trib
    Jun 03, 2022 @ 14:01
    Kevin Meilander
    0

    Thanks. I don't think we'll want to use the unstable version, but should be able to wait until 2.3 is released.

    It also looks like the stripe payment provider code is open sourced, so if we need this logic sooner, I think we can do a custom build of that repo with the permission logic right in there. It's not ideal, but is our plan B right now.

    https://github.com/vendrhub/vendr-payment-provider-stripe

Please Sign in or register to post replies

Write your reply to:

Draft