What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi everyone, we're using the `"spryker-eco/braintree"` module (version: 3.0.0) for payment processi

UKHUU3NE9
UKHUU3NE9 Posts: 17 🧑🏻‍🚀 - Cadet
edited April 2020 in Help

Hi everyone,

we're using the "spryker-eco/braintree" module (version: 3.0.0) for payment processing and have found a possible issue.

First some background: we have a custom checkout and are currently trying to catch errors by plugins which do not set is_successful flag to false in case of error (as some other plugins in the checkout/placeOrder process, like BraintreePreCheckPlugin plugin) by adding an additional check for errors (error count > 0) in CheckoutResponseTransfer.

The issue: we found a CheckoutWorkflow postSaveHook plugin (in detail: "BraintreePostSavePlugin"), which could possibly prevent order placement by adding an error to the CheckoutResponseTransfer (it does not set is_successful flag to false).

1) Why ist an error possibly created (in BraintreePostSavePlugin) after the order was saved? The question is: how to react to this error? We possibly have a valid saved order in this moment, but we can not say: "Thanks for your order, but your payment has failed."

2) The implementation is maybe incorrect. It looks for a PaymentBraintreeTransactionStatusLogTransfer instance AND code != ApiConstants::PAYMENT_CODE_AUTHORIZE_SUCCESS (1000). This check only matches an entry with wrong code, but what about missing status-log entry? Does "no status-log entry" mean no error?

https://github.com/spryker-eco/braintree/blob/master/src/SprykerEco/Zed/Braintree/Business/Hook/PostSaveHook.php (no changes here atleast since 3.0.0)

Thanks for any help!

Comments

  • Ievgen Varava
    Ievgen Varava Sprykee Posts: 154 🧑🏻‍🚀 - Cadet
    edited April 2020

    as far as I remember, common approach for payment provider integrations was to process as much as possible in OMS to indicate status. I don't know specifics of Braintree flow to say if using postSaveHook makes any sense in this particular case.

  • UKHUU3NE9
    UKHUU3NE9 Posts: 17 🧑🏻‍🚀 - Cadet

    Hi Ievgen, nice to hear/read from you 🙂 Can you foward this topic to or name a "Braintree" export on Spryker side for discussing the topic? I also can create a support request ticket, if it would be the better way.

  • Ievgen Varava
    Ievgen Varava Sprykee Posts: 154 🧑🏻‍🚀 - Cadet

    I think support ticket would be better as noone else have answered in the thread