Skip to content

Commit

Permalink
bugfix/PP-13303: before delete gateway check transaction too
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothss4u committed Nov 29, 2024
1 parent 1b0addc commit 3a06ecb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion PayrexxPaymentGatewaySW6/src/Handler/PaymentHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ public function pay(AsyncPaymentTransactionStruct $transaction, RequestDataBag $
if (in_array($paymentMean, ['sofortueberweisung_de', 'postfinance_card', 'postfinance_efinance'])) {
throw new Exception('Unavailable payment method error');
}

// Create Payrexx Gateway link for checkout and redirect user
try {
$payrexxGateway = $this->payrexxApiService->createPayrexxGateway(
Expand Down
2 changes: 1 addition & 1 deletion PayrexxPaymentGatewaySW6/src/Service/PayrexxApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function deletePayrexxGateway(string $salesChannelId, int $gatewayId): vo

$payrexx = $this->getInterface($salesChannelId);
$gateway = $this->getPayrexxGateway($gatewayId, $salesChannelId);
if ($payrexx && $gateway && !$gateway->getInvoices()) {
if ($payrexx && $gateway && !$this->getTransactionByGateway($salesChannelId, $gatewayId)) {
try {
$payrexx->delete($gateway);
} catch (\Payrexx\PayrexxException $e) {
Expand Down

0 comments on commit 3a06ecb

Please sign in to comment.