diff --git a/src/Handlers/AbstractPaymentMethodHandler.php b/src/Handlers/AbstractPaymentMethodHandler.php index ec407328..63206696 100644 --- a/src/Handlers/AbstractPaymentMethodHandler.php +++ b/src/Handlers/AbstractPaymentMethodHandler.php @@ -566,7 +566,6 @@ protected function preparePaymentsRequest( $paymentRequest->setShopperIP($shopperIp); $paymentRequest->setShopperReference($shopperReference); - //Building payment data //Building payment data $amount = $partialAmount ?: $this->currency->sanitize( $transaction->getOrder()->getPrice()->getTotalPrice(), diff --git a/src/Handlers/PaymentResponseHandler.php b/src/Handlers/PaymentResponseHandler.php index 82842321..0d30d14a 100644 --- a/src/Handlers/PaymentResponseHandler.php +++ b/src/Handlers/PaymentResponseHandler.php @@ -170,8 +170,8 @@ public function handlePaymentResponse( $paymentResponseHandlerResult->setIsGiftcardOrder($isGiftcardOrderResponse); -// TODO: donation token is null in response in case of ideal payments - Ask Can what to do about it $donationToken = $response->getDonationToken(); + // Set Donation Token if response contains it, except for giftcards if (!empty($donationToken) && !$isGiftcardOrderResponse) { $paymentResponseHandlerResult->setDonationToken($donationToken);