Skip to content

UPA : Resolved Issued and Improvements - #549

Merged
pratik-bharodiya merged 12 commits into
developfrom
upa-webhook-issue
Sep 29, 2026
Merged

pratik-bharodiya merged 12 commits into
developfrom
upa-webhook-issue

Conversation

@pratik-bharodiya

@pratik-bharodiya pratik-bharodiya commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Description

  • Sync Order status functionality not working. While place the UPA order with web-hook enable. Given Error Message : "Charge Id is not found".
    This PR contain the solution for the above mention scenario.
  • Remove session_id display from transaction table. As we are using session_id for our internal logic.
  • Display only charge_id in transaction table. Same like legacy flow.
  • Remove QR code from order success page only for UPA order.

Rollback procedure

default rollback procedure

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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, and charge_id on 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.

Comment thread Controller/Callback/UPACallback.php Outdated
@pratik-bharodiya pratik-bharodiya changed the title UPA : Sync Order Status Issue UPA : Resoled Issued and Improvements Sep 14, 2026
@rosle
rosle requested a lite review from Copilot September 14, 2026 11:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 $transactionBuilder in UPACallback, 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

Comment thread Controller/Callback/UPACallback.php
Comment thread Controller/Callback/UPACallback.php
@pratik-bharodiya pratik-bharodiya changed the title UPA : Resoled Issued and Improvements UPA : Resolved Issued and Improvements Sep 24, 2026
Comment thread Block/Checkout/Onepage/Success/ConveniencestoreAdditionalInformation.php Outdated
Comment thread Block/Checkout/Onepage/Success/ConveniencestoreAdditionalInformation.php Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Critical callback persistence and convenience-store success-page issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 4 High severity

Open (4)

Comment thread Block/Checkout/Onepage/Success/ConveniencestoreAdditionalInformation.php Outdated
Comment thread Controller/Callback/UPACallback.php
Comment thread Block/Checkout/Onepage/Success/ConveniencestoreAdditionalInformation.php Outdated
@sonarqubecloud

Copy link
Copy Markdown

$paymentData = $order->getPayment()->getData();
$paymentAdditionalInfo = $paymentData['additional_information'];

if (array_key_exists('session_id', $paymentAdditionalInfo) && !empty($paymentAdditionalInfo['session_id'])) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: ‏Can we use $this->isUpaPayment() here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@pratik-bharodiya
pratik-bharodiya merged commit 15587c7 into develop Sep 29, 2026
5 of 6 checks passed
@pratik-bharodiya
pratik-bharodiya deleted the upa-webhook-issue branch September 29, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants