Open rioug opened 3 weeks ago
I am yet to address all the review comments, but I had to do a bit more work to handle this requirement:
I ended up creating Vouchers::Vine
because in the end it is different enough from Vouchers::FlatRate
to have its' own class, mainly because we now have different requirement on the uniqueness of a voucher code.
@dacook I started looking into handling API error with exception, and you are right it should be a bit cleaner than the current solution.
Moving back into code review because I think it's worth Maikel having a look even if it's not totally finished
⚠️ When working on this use the Clockify code: Citi Food Vouchers: #1A. https://github.com/openfoodfoundation/openfoodnetwork/issues/11922 Citi OFN Voucher - VINE Integration ⚠️
What? Why?
It lets a customer use a VINE voucher on their order. OFN will communicate with the VINE Api :
What should we test?
Set up: _!! Make sure "connectedapps" feature is turned on Logged as an enterprise to VINE, in the backoffice as an enterprise manager :
Log into VINE https://vine-staging.openfoodnetwork.org.au/ :
Normal checkout
Make sure you have an order cycle set up with the enterprise you connected to VINE set as a distributor, set your team in VINE to "OFN test - merchant"
Same voucher used by multiple enterprise
Same as above, but this time use a $50 voucher from the first voucher set and place order under $50 so we can use the voucher with another enterprise.
Failed redemption :
Admin - capture a payment
Failed redemption:
Admin - create a payment
Failed redemption:
Report
Check the voucher are showing up correctly on the following reports:
Release notes
Changelog Category (reviewers may add a label for the release notes):
The title of the pull request will be included in the release notes.