Code Monkey home page Code Monkey logo

Comments (6)

andris-sevcenko avatar andris-sevcenko commented on June 12, 2024 1

Gotcha!

from commerce-mollie.

stenvdb avatar stenvdb commented on June 12, 2024

Maybe this could be useful for others:

I didn't use the getPaymentFormHtml() in the end. What I did instead was:

{% for paymentMethod in cart.gateway.fetchPaymentMethods() %}
  {# Implement a custom radio button here #}
  {% if paymentMethod.id == 'ideal' %}
    {% for issuer in cart.gateway.fetchIssuers() %}
      {# Implement a custom dropdown here #}
    {% endfor %
  {% endif %}
{% endfor %}

from commerce-mollie.

andris-sevcenko avatar andris-sevcenko commented on June 12, 2024

In the getPaymentFormHtml() method there is a check if the fetchIssuers() method works. But this method does not work if ideal is not selected in the website profile in mollie.

Okay, but what would be the resolution here? If Mollie doesn't return the issuers then we don't have it. Seems like your approach is a great way as it's also more likely that the site developer will know what the list has to be.

from commerce-mollie.

stenvdb avatar stenvdb commented on June 12, 2024

Hi @andris-sevcenko, issuers and payment methods are 2 different things in mollie. If issuers don't apply (-> when ideal is not checked in mollie's dashboard), then we should still be returning the selected payment methods. But in the current implementation nothing is returned.

from commerce-mollie.

timvermaercke avatar timvermaercke commented on June 12, 2024

This is because fetchIssuers() throws a Omnipay\Common\Http\Exception\RequestException, as there are no issuers defined for Belgian payment methods. The getPaymentFormHtmlmethod catches the exception and returns an empty response.

I created a pull request with my fix;

from commerce-mollie.

nfourtythree avatar nfourtythree commented on June 12, 2024

This is fixed with the merge of #30 .

Fix will be included in the next release of the plugin.

Thanks!

from commerce-mollie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.