Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue with Zero Price: When a discount is applied to an order, and the final price becomes zero, the Viva payment system responds with an HTTP error 500. This issue occurs because Viva does not handle transactions with a zero amount correctly.
Database Column Name Change: In the database model, the column originally named vivawallet_total was renamed to payment_vivawallet_total. This change was made to ensure consistency and to match the actual column name used in the database.
Controller Modification for Checkout Process: An additional 'if' statement was added to the controller code. This modification was added for scenarios like one-page checkout processes, where the sequence of loading various components might differ from what the Viva extension originally expected. This change helps to avoid issues by ensuring that the payment process is only initiated when appropriate, especially in cases where the order amount might be zero due to discounts or other factors.