Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SL-196: payment method invoice append #134

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

mant02
Copy link
Contributor

@mant02 mant02 commented Dec 8, 2023

image
image

@@ -21,6 +21,8 @@
*@license SIX Payment Services
*/

use Invertus\SaferPay\Repository\SaferPayOrderRepository;
Copy link
Contributor

@mandan2 mandan2 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If module is supported in 1.6, then do not use dependency import here in main class. If you need to define service namespace, use full namespace where you need that (probably other services are use there like that as well).

public function hookActionObjectOrderPaymentAddAfter($params)
{
/** @var OrderPayment $orderPayment */
$orderPayment = $params['object'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if this is valid object as well, also check if array key is actually set

$orders = Order::getByReference($orderPayment->order_reference);

/** @var Order $order */
$order = $orders->getFirst();
Copy link
Contributor

@mandan2 mandan2 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can also be bool (not sure what in 1.6 is return value). Order|bool

return;
}

// NOTE: ask on what to name the payment method. Ex. SaferPay - PayPal ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, did you ask...?

return;
}

$brand = $saferPayOrderRepository->getPaymentBrandByAssertId($saferPayAssertId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useless method, just retrieve brand by safer pay order id and replace method above

Base automatically changed from SL-192-new-description-field to release_1_1_8 December 12, 2023 09:28
@mant02 mant02 merged commit c210cc5 into release_1_1_8 Dec 12, 2023
@mant02 mant02 deleted the SL-196-payment-method-invoice-append branch December 12, 2023 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants