Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Controller/Callback/Offsite.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ private function handleSuccess($order, $chargeId, $payment, $paymentMethod)
$payment->addTransactionCommentsToOrder(
$payment->addTransaction(Transaction::TYPE_PAYMENT, $invoice),
__(
"Amount of %1 has been paid via Opn Payments $paymentMethodLabel payment",
"Amount of %1 has been paid via Omise $paymentMethodLabel payment",
$order->getBaseCurrency()->formatTxt($invoice->getBaseGrandTotal())
)
);
Expand Down Expand Up @@ -210,7 +210,7 @@ private function handlePending($order, $payment)
$transaction,
__('The payment is under processing.<br/>Due to Bank process, this might take up to an hour to
complete. Click "Accept" or "Deny" to accept or deny the payment manually, after the result of
the processing has been updated (check the result on the Opn Payments Dashboard).')
the processing has been updated (check the result on the Omise Dashboard).')
);

$order->save();
Expand Down
4 changes: 2 additions & 2 deletions Controller/Callback/Threedsecure.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function execute()
$payment->addTransactionCommentsToOrder(
$payment->addTransaction(Transaction::TYPE_CAPTURE, $invoice),
__(
'Captured amount of %1 online via Opn Payments Gateway (3-D Secure payment).',
'Captured amount of %1 online via Omise Payments Gateway (3-D Secure payment).',
$order->getBaseCurrency()->formatTxt($invoice->getBaseGrandTotal())
)
);
Expand All @@ -177,7 +177,7 @@ public function execute()
$payment->addTransaction(Transaction::TYPE_AUTH),
$payment->prependMessage(
__(
'Authorized amount of %1 via Opn Payments Gateway (3-D Secure payment).',
'Authorized amount of %1 via Omise Payments Gateway (3-D Secure payment).',
$order->getBaseCurrency()->formatTxt($order->getTotalDue())
)
)
Expand Down
2 changes: 1 addition & 1 deletion Cron/OrderSyncStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private function sync()
if ($isExpired) {
$this->syncStatus->cancelOrderInvoice($this->order);
$this->order
->registerCancellation(__('Opn Payments: Payment expired. (cron job sync).'))
->registerCancellation(__('Omise: Payment expired. (cron job sync).'))
->save();
}
}
Expand Down
4 changes: 2 additions & 2 deletions Gateway/Command/CreditCardStrategyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function execute(array $commandSubject)
$payment->addTransactionCommentsToOrder(
$payment->addTransaction(Transaction::TYPE_CAPTURE, $invoice),
__(
'Captured amount of %1 online via Opn Payments Gateway.',
'Captured amount of %1 online via Omise Payment Gateway.',
$order->getBaseCurrency()->formatTxt($invoice->getBaseGrandTotal())
)
);
Expand All @@ -118,7 +118,7 @@ public function execute(array $commandSubject)
$payment->addTransaction(Transaction::TYPE_AUTH),
$payment->prependMessage(
__(
'Authorized amount of %1 via Opn Payments Gateway.',
'Authorized amount of %1 via Omise Payments Gateway.',
$order->getBaseCurrency()->formatTxt($order->getTotalDue())
)
)
Expand Down
2 changes: 1 addition & 1 deletion Gateway/Http/Client/PaymentRefund.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function placeRequest(\Magento\Payment\Gateway\Http\TransferInterface $tr
$sourceType = $charge->source['type'] ?? 'credit_card';
$method = str_replace('_', ' ', $sourceType);
throw new \Magento\Framework\Exception\LocalizedException(
__('Payment with Opn Payments %1 cannot be refunded.', $method)
__('Payment with Omise %1 cannot be refunded.', $method)
);
}

Expand Down
2 changes: 1 addition & 1 deletion Gateway/Response/PaymentDetailsHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function handle(array $handlingSubject, array $response)
$transaction,
$payment->prependMessage(
__(
'Processing amount of %1 via Opn Payments Gateway.',
'Processing amount of %1 via Omise Payments Gateway.',
$order->getBaseCurrency()->formatTxt($order->getTotalDue())
)
)
Expand Down
16 changes: 8 additions & 8 deletions Model/SyncStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function sync($order)
$chargeId = $this->helper->getOrderChargeId($order);

if (!$chargeId) {
throw new LocalizedException(__('Unable to find Opn Payments charge ID'));
throw new LocalizedException(__('Unable to find Omise charge ID'));
}

// set the store to fetch configuration values from store specific to the order
Expand All @@ -90,7 +90,7 @@ public function sync($order)
break;
default:
throw new LocalizedException(
__('Cannot read the payment status. Please try sync again or contact Opn Payments support team
__('Cannot read the payment status. Please try sync again or contact Omise support team
at [email protected] if you have any questions.')
);
}
Expand Down Expand Up @@ -125,7 +125,7 @@ private function markPaymentSuccessful($order, $charge)

$order->addStatusHistoryComment(
__(
'Opn Payments: Payment successful.<br/>An amount %1 %2 has been paid (manual sync).',
'Omise: Payment successful.<br/>An amount %1 %2 has been paid (manual sync).',
number_format($order->getGrandTotal(), 2, '.', ''),
$order->getOrderCurrencyCode()
)
Expand Down Expand Up @@ -159,7 +159,7 @@ private function markPaymentFailed($order, $charge)
$this->cancelOrderInvoice($order);
$order->registerCancellation(
__(
'Opn Payments: Payment failed.<br/>%1 (code: %2) (manual sync).',
'Omise: Payment failed.<br/>%1 (code: %2) (manual sync).',
$charge['failure_message'],
$charge['failure_code']
)
Expand All @@ -172,8 +172,8 @@ private function markPaymentFailed($order, $charge)
private function markOrderPending($order)
{
$order->addStatusHistoryComment(
__('Opn Payments: Payment is still in progress.<br/>
You might wait for a moment before click sync the status again or contact Opn Payments support
__('Omise: Payment is still in progress.<br/>
You might wait for a moment before click sync the status again or contact Omise support
team at [email protected] if you have any questions (manual sync).')
);
if ($order->getState() != Order::STATE_PENDING_PAYMENT) {
Expand All @@ -188,7 +188,7 @@ private function markOrderPending($order)
private function markPaymentExpired($order)
{
$this->cancelOrderInvoice($order);
$order->registerCancellation(__('Opn Payments: Payment expired. (manual sync).'))
$order->registerCancellation(__('Omise: Payment expired. (manual sync).'))
->save();
}

Expand All @@ -198,7 +198,7 @@ private function markPaymentExpired($order)
private function markPaymentReversed($order)
{
$this->cancelOrderInvoice($order);
$order->registerCancellation(__('Opn Payments: Payment reversed. (manual sync).'))
$order->registerCancellation(__('Omise: Payment reversed. (manual sync).'))
->save();
}
}
6 changes: 3 additions & 3 deletions Observer/WebhookObserver/WebhookCompleteObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function execute(Observer $observer)
}

// To handle the situation where charge is manually updated as successful
// from Opn Payments dashboard after the order is canceled.
// from Omise dashboard after the order is canceled.
if ($this->orderData->getState() === MagentoOrder::STATE_CANCELED && $this->charge->isSuccessful()) {
$this->processCancelledOrder();
}
Expand All @@ -75,10 +75,10 @@ private function transactionCommentToOrder(bool $isCaptured, string $amount)
{
if ($isCaptured) {
$transaction = $this->payment->addTransaction(Transaction::TYPE_PAYMENT, $this->invoice);
$comment = __('Amount of %1 has been paid via Opn Payments Gateway.', $amount);
$comment = __('Amount of %1 has been paid via Omise Payments Gateway.', $amount);
} else {
$transaction = $this->payment->addTransaction(Transaction::TYPE_AUTH, $this->invoice);
$comment = __('Authorized amount of %1 via Opn Payments Gateway (3-D Secure payment).', $amount);
$comment = __('Authorized amount of %1 via Omise Payments Gateway (3-D Secure payment).', $amount);
}

$this->payment->addTransactionCommentsToOrder($transaction, $comment);
Expand Down
2 changes: 1 addition & 1 deletion Observer/WebhookObserver/WebhookRefundObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private function closeOrder()

$this->orderData->addStatusHistoryComment(
__(
"Opn Payments: Payment refunded.<br/>An amount %1 %2 has been {$refundContextText} refunded.",
"Omise: Payment refunded.<br/>An amount %1 %2 has been {$refundContextText} refunded.",
$this->orderData->getOrderCurrencyCode(),
number_format($this->charge->getRefundedAmount(), 2, '.', '')
)
Expand Down
6 changes: 3 additions & 3 deletions Plugin/ConfigSectionPaymentPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class ConfigSectionPaymentPlugin
* @var array
*/
private $errorCodes = [
'authentication_failure' => 'The keys for Opn Payments are invalid',
'key_expired_error' => 'The keys for Opn Payments are expired.',
'authentication_failure' => 'The keys for Omise Payments are invalid',
'key_expired_error' => 'The keys for Omise Payments are expired.',
'locked_account_error' => 'The account is locked. Please contact [email protected].',
'not_authorized' => 'An attempt was made to perform an unauthorized action.',
];
Expand Down Expand Up @@ -244,7 +244,7 @@ private function validatePaymentMethods($paymentList, $omiseConfigPaymentList, $
// show error message by using title from omise helper
if (! empty($nonSupportPayments)) {
$this->messageManager->
addError(__("This Opn Payments account does not support " . implode(", ", $nonSupportPayments)));
addError(__("This Omise account does not support " . implode(", ", $nonSupportPayments)));
}
return $data;
}
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<!--- KEEP START --->
[![Opn Payments](https://www.opn.ooo/assets/svg/logo-opn-full.svg)](https://www.opn.ooo)
[![Omise Payments](images/Omise-logo-dark.svg)](https://www.omise.co/)

[Opn Payments](https://www.opn.ooo) is a payment service provider operating in Thailand, Japan, and Singapore.
Opn Payments provides a set of APIs that help merchants of any size accept payments online.
[Omise Payments](https://www.omise.co/) is a payment service provider operating in Thailand, Japan, and Singapore.
Omise Payments provides a set of APIs that help merchants of any size accept payments online.
<!--- KEEP END --->

**Omise Magento** is our official plugin providing support for processing payments on Magento through Opn Payments.
**Omise Magento** is our official plugin providing support for processing payments on Magento through Omise Payments.

## Security Warning

**Please do NOT use Omise Magento plugin versions less than 2.18.6, as they are outdated and have security vulnerabilities.**

## Usage

See our [official docs](https://docs.opn.ooo/magento-plugin) for details on installation and configuration.
See our [official docs](https://docs.omise.co/magento-plugin) for details on installation and configuration.

## Contributing

Expand Down
12 changes: 6 additions & 6 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<system>
<section id="payment">
<group id="omise" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Opn Payments</label>
<label>Omise Payments</label>
<fieldset_css>omise-section</fieldset_css>
<frontend_model>Omise\Payment\Block\Adminhtml\System\Config\Fieldset\Payment</frontend_model>
<attribute type="displayIn">recommended_solutions</attribute>
Expand All @@ -18,26 +18,26 @@
</field>
<field id="test_public_key" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Public key for test</label>
<comment>The "Test" mode public key can be found in Opn Payments Dashboard.</comment>
<comment>The "Test" mode public key can be found in Omise Dashboard.</comment>
</field>
<field id="test_secret_key" translate="label" type="password" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Secret key for test</label>
<comment>The "Test" mode secret key can be found in Opn Payments Dashboard.</comment>
<comment>The "Test" mode secret key can be found in Omise Dashboard.</comment>
</field>
<field id="live_public_key" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Public key for live</label>
<comment>The "Live" mode public key can be found in Opn Payments Dashboard.</comment>
<comment>The "Live" mode public key can be found in Omise Dashboard.</comment>
</field>
<field id="live_secret_key" translate="label" type="password" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Secret key for live</label>
<comment>The "Live" mode secret key can be found in Opn Payments Dashboard.</comment>
<comment>The "Live" mode secret key can be found in Omise Dashboard.</comment>
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Not sure if this is intentional but there seems to be 2 whitespaces instead of one.‏

</field>
<field id="webhook_status" translate="label comment" type="select" sortOrder="61" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enable webhooks</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<comment>
<![CDATA[Enable webhooks to receive updates when charge and refund events occur. To learn more, see <a href="https://docs.opn.ooo/api-webhooks">our webhooks documentation</a>. </br></br>
Unless dynamic webhooks are enabled, you must add the URL below as a new endpoint on your <a href="https://dashboard.omise.co/v2/settings/webhooks">Opn Payments dashboard</a> (HTTPS only).
Unless dynamic webhooks are enabled, you must add the URL below as a new endpoint on your <a href="https://dashboard.omise.co/v2/settings/webhooks">Omise dashboard</a> (HTTPS only).
]]>
</comment>
</field>
Expand Down
16 changes: 16 additions & 0 deletions view/adminhtml/web/images/Omise-logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading