Skip to content

Commit

Permalink
method_codes field default empty string not null
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-zhang-awx committed Nov 8, 2024
1 parent 6b24a79 commit 87f30aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Model/PaymentIntent.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function setDetail(string $detail): PaymentIntentInterface
*/
public function getMethodCodes(): string
{
return $this->getData(PaymentIntentInterface::METHOD_CODES_COLUMN);
return $this->getData(PaymentIntentInterface::METHOD_CODES_COLUMN) ?? '';
}

/**
Expand Down
3 changes: 2 additions & 1 deletion Model/Ui/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public function __construct(
private function getAvailableCurrencies()
{
$cacheName = 'airwallex_available_currencies';
if (!$result = $this->cache->load($cacheName)) {
$result = $this->cache->load($cacheName);
if (empty($result) || $result === "[]") {
$index = 0;
$items = [];
while (true) {
Expand Down
2 changes: 1 addition & 1 deletion etc/db_schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<column xsi:type="int" name="order_id" nullable="false" default="0"/>
<column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"/>
<column xsi:type="text" name="detail" nullable="true"/>
<column xsi:type="text" name="method_codes" nullable="true"/>
<column xsi:type="text" name="method_codes" nullable="false" default=""/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="id"/>
</constraint>
Expand Down

0 comments on commit 87f30aa

Please sign in to comment.