Skip to content

Commit 49b6d7c

Browse files
author
Fabian Pechstein
committed
[bug-fix] react to differnet txStatus updates
1 parent 6ad88a3 commit 49b6d7c

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/PayoneBundle/Ecommerce/PaymentManager/BsPayone.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,13 +970,22 @@ public function handleResponse($response)
970970

971971
$this->registry->logTransaction($response['reference'], $response['txid'], $response['txaction'], $response);
972972

973+
973974
if ($response['reference'] !== null && (($response['txaction'] == 'appointed'))) {
974975
$paymentStatus = StatusInterface::STATUS_AUTHORIZED;
975976
} else if ($response['reference'] !== null && (($response['txaction'] == 'paid'))) {
976977
$paymentStatus = StatusInterface::STATUS_CLEARED;
977978
// resolve capture
978979
$this->captureQueue->resolveCapture($response['txid']);
979-
980+
} else if ($response['reference'] !== null && (($response['txaction'] == 'capture'))) {
981+
$paymentStatus = StatusInterface::STATUS_CLEARED;
982+
} else if ($response['reference'] !== null && (($response['txaction'] == 'cancelation'))) {
983+
$paymentStatus = StatusInterface::STATUS_CANCELLED;
984+
} else if ($response['reference'] !== null && (($response['txaction'] == 'reminder'))) {
985+
$paymentStatus = StatusInterface::STATUS_AUTHORIZED;
986+
} else if ($response['reference'] !== null && (($response['txaction'] == 'invoice'))) {
987+
//TODO: is that correct?
988+
$paymentStatus = StatusInterface::STATUS_AUTHORIZED;
980989
}
981990

982991
$status = new Status(

0 commit comments

Comments
 (0)