Skip to content

Commit 3841982

Browse files
Asmita TanksaleAsmita Tanksale
authored andcommitted
[MIT-3148] PR review changes
1 parent 0f5f26e commit 3841982

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

Cron/OrderSyncStatus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ private function sync()
177177
if ($isExpired) {
178178
$this->syncStatus->cancelOrderInvoice($this->order);
179179
$this->order
180-
->registerCancellation(__('Omise Payments: Payment expired. (cron job sync).'))
180+
->registerCancellation(__('Omise : Payment expired. (cron job sync).'))
181181
->save();
182182
}
183183
}

Model/SyncStatus.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function sync($order)
6565
$chargeId = $this->helper->getOrderChargeId($order);
6666

6767
if (!$chargeId) {
68-
throw new LocalizedException(__('Unable to find Omise Payments charge ID'));
68+
throw new LocalizedException(__('Unable to find Omise charge ID'));
6969
}
7070

7171
// set the store to fetch configuration values from store specific to the order
@@ -74,7 +74,7 @@ public function sync($order)
7474

7575
switch ($charge['status']) {
7676
case self::STATUS_SUCCESSFUL:
77-
$this->markPaymentSuccessful($order, $charge);
77+
$this->maruccessful($order, $charge);
7878
break;
7979
case self::STATUS_FAILED:
8080
$this->markPaymentFailed($order, $charge);
@@ -90,7 +90,7 @@ public function sync($order)
9090
break;
9191
default:
9292
throw new LocalizedException(
93-
__('Cannot read the payment status. Please try sync again or contact Omise Payments support team
93+
__('Cannot read the payment status. Please try sync again or contact Omise support team
9494
at support@omise.co if you have any questions.')
9595
);
9696
}
@@ -101,7 +101,7 @@ public function sync($order)
101101
* @param array $charge
102102
* @return void
103103
*/
104-
private function markPaymentSuccessful($order, $charge)
104+
private function maruccessful($order, $charge)
105105
{
106106
$orderStateNotClosed = $order->getState() != Order::STATE_CLOSED;
107107

@@ -125,7 +125,7 @@ private function markPaymentSuccessful($order, $charge)
125125

126126
$order->addStatusHistoryComment(
127127
__(
128-
'Omise Payments: Payment successful.<br/>An amount %1 %2 has been paid (manual sync).',
128+
'Omise: Payment successful.<br/>An amount %1 %2 has been paid (manual sync).',
129129
number_format($order->getGrandTotal(), 2, '.', ''),
130130
$order->getOrderCurrencyCode()
131131
)
@@ -159,7 +159,7 @@ private function markPaymentFailed($order, $charge)
159159
$this->cancelOrderInvoice($order);
160160
$order->registerCancellation(
161161
__(
162-
'Omise Payments: Payment failed.<br/>%1 (code: %2) (manual sync).',
162+
'Omise: Payment failed.<br/>%1 (code: %2) (manual sync).',
163163
$charge['failure_message'],
164164
$charge['failure_code']
165165
)
@@ -172,8 +172,8 @@ private function markPaymentFailed($order, $charge)
172172
private function markOrderPending($order)
173173
{
174174
$order->addStatusHistoryComment(
175-
__('Omise Payments: Payment is still in progress.<br/>
176-
You might wait for a moment before click sync the status again or contact Omise Payments support
175+
__('Omise: Payment is still in progress.<br/>
176+
You might wait for a moment before click sync the status again or contact Omise support
177177
team at support@omise.co if you have any questions (manual sync).')
178178
);
179179
if ($order->getState() != Order::STATE_PENDING_PAYMENT) {
@@ -188,7 +188,7 @@ private function markOrderPending($order)
188188
private function markPaymentExpired($order)
189189
{
190190
$this->cancelOrderInvoice($order);
191-
$order->registerCancellation(__('Omise Payments: Payment expired. (manual sync).'))
191+
$order->registerCancellation(__('Omise: Payment expired. (manual sync).'))
192192
->save();
193193
}
194194

@@ -198,7 +198,7 @@ private function markPaymentExpired($order)
198198
private function markPaymentReversed($order)
199199
{
200200
$this->cancelOrderInvoice($order);
201-
$order->registerCancellation(__('Omise Payments: Payment reversed. (manual sync).'))
201+
$order->registerCancellation(__('Omise: Payment reversed. (manual sync).'))
202202
->save();
203203
}
204204
}

Observer/WebhookObserver/WebhookCompleteObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function execute(Observer $observer)
5959
}
6060

6161
// To handle the situation where charge is manually updated as successful
62-
// from Omise Payments dashboard after the order is canceled.
62+
// from Omise dashboard after the order is canceled.
6363
if ($this->orderData->getState() === MagentoOrder::STATE_CANCELED && $this->charge->isSuccessful()) {
6464
$this->processCancelledOrder();
6565
}

Observer/WebhookObserver/WebhookRefundObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private function closeOrder()
5757

5858
$this->orderData->addStatusHistoryComment(
5959
__(
60-
"Omise Payments: Payment refunded.<br/>An amount %1 %2 has been {$refundContextText} refunded.",
60+
"Omise: Payment refunded.<br/>An amount %1 %2 has been {$refundContextText} refunded.",
6161
$this->orderData->getOrderCurrencyCode(),
6262
number_format($this->charge->getRefundedAmount(), 2, '.', '')
6363
)

Plugin/ConfigSectionPaymentPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ private function validatePaymentMethods($paymentList, $omiseConfigPaymentList, $
244244
// show error message by using title from omise helper
245245
if (! empty($nonSupportPayments)) {
246246
$this->messageManager->
247-
addError(__("This Omise Payments account does not support " . implode(", ", $nonSupportPayments)));
247+
addError(__("This Omise account does not support " . implode(", ", $nonSupportPayments)));
248248
}
249249
return $data;
250250
}

etc/adminhtml/system.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@
1818
</field>
1919
<field id="test_public_key" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
2020
<label>Public key for test</label>
21-
<comment>The "Test" mode public key can be found in Omise Payments Dashboard.</comment>
21+
<comment>The "Test" mode public key can be found in Omise Dashboard.</comment>
2222
</field>
2323
<field id="test_secret_key" translate="label" type="password" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
2424
<label>Secret key for test</label>
25-
<comment>The "Test" mode secret key can be found in Omise Payments Dashboard.</comment>
25+
<comment>The "Test" mode secret key can be found in Omise Dashboard.</comment>
2626
</field>
2727
<field id="live_public_key" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
2828
<label>Public key for live</label>
29-
<comment>The "Live" mode public key can be found in Omise Payments Dashboard.</comment>
29+
<comment>The "Live" mode public key can be found in Omise Dashboard.</comment>
3030
</field>
3131
<field id="live_secret_key" translate="label" type="password" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
3232
<label>Secret key for live</label>
33-
<comment>The "Live" mode secret key can be found in Omise Payments Dashboard.</comment>
33+
<comment>The "Live" mode secret key can be found in Omise Dashboard.</comment>
3434
</field>
3535
<field id="webhook_status" translate="label comment" type="select" sortOrder="61" showInDefault="1" showInWebsite="1" showInStore="1">
3636
<label>Enable webhooks</label>

0 commit comments

Comments
 (0)