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

[Admin] Configure available Saferpay payment methods retrieved by the API #51

Merged
merged 15 commits into from
Jun 6, 2023
Merged

[Admin] Configure available Saferpay payment methods retrieved by the API #51

merged 15 commits into from
Jun 6, 2023

Conversation

GSadee
Copy link
Contributor

@GSadee GSadee commented May 31, 2023

Payment method index page:
image

Saferpay available payment methods configuration page:
image

image

@GSadee GSadee added the Feature label May 31, 2023
config/services/command_handler.php Outdated Show resolved Hide resolved
config/services/providers.php Outdated Show resolved Hide resolved
spec/Provider/SaferpayPaymentMethodsProviderSpec.php Outdated Show resolved Hide resolved
src/Client/SaferpayClientBodyFactory.php Outdated Show resolved Hide resolved
/** @var array $allowedPaymentMethods */
$allowedPaymentMethods = $data['allowed_payment_methods'];

$this->commandBus->dispatch(new ConfigurePaymentMethods($paymentMethodId, $allowedPaymentMethods));
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if command pattern is not an overkill here 🤔 Cannot we just use a standard resource update action to partially update the payment method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you're right that this might be overkill, but at the same time I'm wondering if it makes sense to change it now as it's a bit of a big change, and I'm also not sure how to properly use the resource controller as it's quite a custom form type and updating one field in the gateway config array, even so not necessarily updating the resource 🤔

@Zales0123 Zales0123 merged commit 5f840db into CommerceWeavers:main Jun 6, 2023
@Zales0123
Copy link
Member

Thank you, Grzegorz! 🖖

@Zales0123 Zales0123 deleted the configure-available-payment-methods-from-saferpay-api branch June 6, 2023 08:34
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