Skip to content

Commit

Permalink
Upgrade installers with getting table names. (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Malichenko authored May 28, 2019
1 parent b39676d commit 3702d3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Gateway/Response/TransactionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ public function handle(array $handlingSubject, array $response) //@codingStandar
case Transaction::TRANSACTION_STATUS_CANCELLED:
$transactionId .= '-void';
break;
case Transaction::TRANSACTION_OPERATION_RESERVE:
case Transaction::TRANSACTION_STATUS_RESERVE:
case Transaction::TRANSACTION_STATUS_RESERVED:
$payment->setIsTransactionClosed(false);
break;
}
Expand Down
8 changes: 4 additions & 4 deletions Setup/UpgradeSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ private function createVippsQuoteTable(SchemaSetupInterface $installer)
)
->addIndex($installer->getIdxName('vipps_quote', 'quote_id'), 'quote_id')
->addForeignKey(
$installer->getFkName('vipps_quote', 'quote_id', 'quote', 'entity_id'),
$installer->getFkName('vipps_quote', 'quote_id', $installer->getTable('quote'), 'entity_id'),
'quote_id',
'quote',
$installer->getTable('quote'),
'entity_id',
Table::ACTION_SET_NULL
);
Expand Down Expand Up @@ -170,9 +170,9 @@ private function createVippsAttemptsTable(SchemaSetupInterface $installer)
)
->addIndex($installer->getIdxName('vipps_quote_attempts', 'parent_id'), 'parent_id')
->addForeignKey(
$installer->getFkName('vipps_quote_attempts', 'parent_id', 'vipps_quote', 'entity_id'),
$installer->getFkName('vipps_quote_attempts', 'parent_id', $installer->getTable('vipps_quote'), 'entity_id'),
'parent_id',
'vipps_quote',
$installer->getTable('vipps_quote'),
'entity_id',
Table::ACTION_CASCADE
);
Expand Down

0 comments on commit 3702d3c

Please sign in to comment.