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

Mollie integration (#3) #68

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

Conversation

mrPauwHaan
Copy link

@mrPauwHaan mrPauwHaan commented Feb 10, 2024

Solves: #29 #58

Added a Mollie integration for Frappe webforms. Mollie is a big payment provider within Europe and, therefore, an essential for many SMEs who want to use Frappe for handling payments

  1. This update integrates Mollie as a payment method in web forms
  2. The user is automatically redirected to a checkout page to review the order, and a payment is automatically generated. It is necessary to have a field within your doctype called payment_id where the Mollie Payment ID is stored.
  3. The user will be redirected to the Mollie-hosted checkout page, so you can configure any payment method within Mollie and create your own checkout.
  4. When the payment is completed, the user is redirected back to the checkout page, where the payment status is automatically verified with Mollie based on the stored payment ID. When the Mollie payment link has expired, a new payment will automatically be generated on the checkout page, if the payment has not been completed yet.
  5. When the payment is completed, the payment url will not be available anymore, and the user will be redirected back to the webform redirect URL.

Optional: create a payment_status field where the status of the payment is automatically stored.
Optional: Use Mollie in test mode by using the test api key in the mollie settings page. Mollie automatically recognizes it as a test payment.

image

image

* Update mollie_settings.py

* Update mollie_settings.json

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update stripe_checkout.js

* Update mollie_checkout.js

* Update stripe_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.html

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.html

* Update mollie_checkout.js

* Update mollie_checkout.html

* Update mollie_checkout.html

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.html

* Update mollie_checkout.html

* Update mollie_checkout.py

* Update mollie_checkout.html

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.html

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.html

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.html

* Update mollie_checkout.html

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.html

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py
@mrPauwHaan
Copy link
Author

mrPauwHaan commented Apr 28, 2024

When will this be merged?

@torstenhoegel
Copy link

+1 for looking into this. Really important to my company for switching to erpnext

@torstenhoegel
Copy link

@trustedcomputer could you pls look into this?

@trustedcomputer
Copy link
Contributor

@torstenhoegel I don't have any write access to the repository. You'll need to find a frappe maintainer to get this moving.

@torstenhoegel
Copy link

@NagariaHussain hey, could you please prioritise this? :) thx

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update stripe_checkout.js

* Update mollie_checkout.js

* Update stripe_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.html

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.html

* Update mollie_checkout.js

* Update mollie_checkout.html

* Update mollie_checkout.html

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.html

* Update mollie_checkout.html

* Update mollie_checkout.py

* Update mollie_checkout.html

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.html

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.html

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_checkout.py

* Update mollie_settings.py

* Update mollie_settings.py

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.html

* Update mollie_checkout.html

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.html

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.js

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

* Update mollie_checkout.py

if payment_status exists, first check for status field in doctype before checking the payment ID in the Mollie API
@NagariaHussain
Copy link
Member

Can you attach a video of the working flow?

@mrPauwHaan
Copy link
Author

mrPauwHaan commented Jul 9, 2024

It is now also compatible with the ability to pay at other moments than only after submitting the web form. This can be used for example in the case where users have a personal account page with "outstanding payments", where you can link them to the checkout page if the payment_status is not "Completed".

Also, before todays changes the Mollie payment status was retrieved from the Mollie API, but I changed this to be overrided when the payment_status field is "Completed". This can be used for whatever reason when you want to manually change the payment_status to "Completed" (e.g. user pays via other sources).

@mrPauwHaan
Copy link
Author

mrPauwHaan commented Jul 9, 2024

Can you attach a video of the working flow?

@NagariaHussain see the video below for the showcase. In the video, I change the payment status manually to "Completed", but obviously this happens automatically after payment

https://youtu.be/0NwQZI6wNg0

@mrPauwHaan
Copy link
Author

@NagariaHussain @pateljannat @blaggacao when will this be merged? You can find a showcase video above

@blaggacao
Copy link
Collaborator

blaggacao commented Oct 9, 2024

There's a refactoring going on, taking shape, being validated over at #53

I haven't updated the PR with the lastest additions and bug fixes from production operation.

I think it is worthwhile to hold back on a merge until the new api stabilizes and then refactor.

I can try to push more fixes/additions, I planned to do that anyway, but now that I know there's a stakeholder I might be even more motivated to get this done 😄

Thanks for the ping!! These are just my 2 cents from a maintenance perspective.

@blaggacao
Copy link
Collaborator

blaggacao commented Oct 9, 2024

PS: If maintenance sharing is less of an issue, for purposes of discoverability, we could add this PR right now to the readme with a caveat. Users can then deploy from this PR/branch and can report their issues here.

Because I agree, Mollie is important in EU!

@mrPauwHaan
Copy link
Author

@blaggacao Thank you for your extensive response. I did not know a refactor was happening, so it makes sense to await the new API. In the meantime, adding it to the readme would indeed help people who need this integration find it easier.

@blaggacao
Copy link
Collaborator

ef713a2

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.

5 participants