binshops / prestashop-rest

PrestaShop REST API module to expose your PrestaShop website's REST endpoints
https://www.binshops.com/prestashop-api
Academic Free License v3.0
94 stars 33 forks source link

Payment options do not work with payU module #49

Closed roszpun closed 1 month ago

roszpun commented 1 month ago

Hey, so I try to implement additional payment method - PayU - https://github.com/PayU-EMEA/plugin_prestashop. Once I enable it I receive 500 error on the VSF implementation.

Cannot read properties of undefined (reading 'code')


      const { data } = await $vsf.$prestashop.api.getPaymentMethods({ psCookieKey, psCookieValue });
      if (data.code === 200) {
        if (Object.keys(data.psdata).length === 0) {
          app.context.redirect('/checkout/shipping');
        }
      } else {
        app.context.redirect('/checkout/shipping');

in middleware/checkout.js

Any ideas what can cause this issue? I tried other Polish based provider and it worked without issues.

samberrry commented 1 month ago

Hey, by default none of the payment options implemented, so it must be developed.

Additionally, VSF 2 is deprecated, so we stopped active development on it, but it's a good sample to get familiar with headless/modern front idea. FYI,currently we are working on something new based on React.js,

have a super day.