Repository navigation
UPA : Resolved Issued and Improvements - #549
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The change is small, localized, and directly addresses the missing charge_id persistence in the webhook-enabled callback path.
Pull request overview
This PR fixes UPA order status sync when webhooks are enabled by ensuring the Omise charge_id is persisted onto the Magento payment record before the webhook-enabled early return, preventing downstream flows (e.g., order status sync) from failing with “Charge Id is not found”.
Changes:
- Persist
transaction_id,last_trans_id, andcharge_idon the order payment before the “webhook enabled” short-circuit. - Minor formatting/spacing cleanup in a conditional and method call.
File summaries
| File | Description |
|---|---|
| Controller/Callback/UPACallback.php | Persists charge identifiers on the payment earlier so webhook-enabled flows still have charge_id available for later sync logic. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
The webhook flow must persist payment IDs before redirecting, and obsolete callback tests and dependency wiring must be updated.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
Controller/Callback/UPACallback.php:176
- This removal eliminates the only use of
$transactionBuilderinUPACallback, but the property, constructor parameter, and assignment remain. The controller now requires an unused dependency and its tests remain coupled to obsolete transaction-building behavior; remove the dead dependency and update the constructor fixture.
if ($this->config->isWebhookEnabled()) {
return $this->redirect(self::PATH_SUCCESS);
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
|
| $paymentData = $order->getPayment()->getData(); | ||
| $paymentAdditionalInfo = $paymentData['additional_information']; | ||
|
|
||
| if (array_key_exists('session_id', $paymentAdditionalInfo) && !empty($paymentAdditionalInfo['session_id'])) { |
There was a problem hiding this comment.
question: Can we use $this->isUpaPayment() here?
There was a problem hiding this comment.
No. Because this class is extending Magento\Framework\View\Element\Template. and other block class like propmptpay, tesco extending Omise\Payment\Block\Checkout\Onepage\Success\AdditionalInformation.
so not possible to use the same method here.
There was a problem hiding this comment.
Seems a bit weird that only this class that does not extend from AdditionalInformation like other classes do. However since this is the existing implementation. I'm ok to keep it like this.




Description
This PR contain the solution for the above mention scenario.
Rollback procedure
default rollback procedure