-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Describe the bug
Our plugin throws PHP error in case of error during charge process (e.g. IP whitelist enabled)
Troublesome code
xendit-opencart-module/opencart3.0.x/upload/catalog/controller/extension/payment/xenditcc.php
Lines 170 to 173 in a5c0cb8
| if ($charge['status'] !== 'CAPTURED') { | |
| $message = 'Charge failed. Cancelling order. Charge id: ' . $charge['id']; | |
| return $this->cancel_order($order_id, $message); | |
| } |
Suggestion to fix
Add error_code checker before status checker
How to reproduce?
- Add some IP in the dashboard's IP whitelisting feature
- Create order
- Checkout
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers