mollie / PrestaShop

iDEAL, Creditcard, Bancontact, SOFORT, Bank transfer, PayPal & paysafecard for Prestashop
http://www.mollie.com
BSD 2-Clause "Simplified" License
69 stars 44 forks source link

Fix for adding issuers for iDEAL in table: ps_ol_payment_method_issuer #902

Closed sharkooon closed 6 months ago

sharkooon commented 7 months ago

On a fresh prestashop installation 8.1.5 with mollie 6.1.0 installed and iDEAL is active. The ideal bank list on checkout is empty.

SELECT * FROM `ps_mol_payment_method_issuer`
0 results.

This commit fixes the ps_mol_payment_method_issuer table being filled when mollie module settings are saved.

To reproduce the issue for mollie v6.1.0:

  1. empty table with: TRUNCATE ps_mol_payment_method_issuer (if table is not empty when upgrading)
  2. save mollie settings from module
  3. SELECT * FROM ps_mol_payment_method_issuer
  4. what results in 0 results, no ideal bank issuers information is available.

After adding 'include' => 'issuers' to $apiMethods = $api->methods->allAvailable(['locale' => '', 'include' => 'issuers']); will fix it, and table is being filled with ideal issuers data for iDEAL.

Module version 6.0.5 does work! But also contains: $apiMethods = $api->methods->allActive(['resource' => 'orders', 'include' => 'issuers', 'includeWallets' => 'applepay']); link to ApiService.php:120 We dont use applepay so can't test that, probably have to add that one too.

JevgenijVisockij commented 6 months ago

"includeWallets' => 'applepay'" breaks the code and doesn't appear to be needed. But "'include' => 'issuers'" is needed inedeed, thanks for your PR!