News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Prevent submit of checkout form

Started by diego.sorribas, November 22, 2021, 18:50:38 PM

Previous topic - Next topic

diego.sorribas

Hi, Im developing a new payment plugin and I dont know how I can prevent the checkout form to submit. I need that the user first add his credit card with a loaded modal (iframe) so the token can travel with the form with also anothers validations.  I see that if I add Javascript from my plugin , after my code the 'vm.checkoutFormSubmit' of the cart is executed so my code is totally overwrited.


pinochico

Order is finished before redirect to payment gate == submit is finished before redirect to payment gate.
This is basic idea from VM.

I don't understand why do you don't know this basic info and why do you trying to change.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

diego.sorribas

Im asking because I didnt found any guide of how to develop a payment plugin on VM.

Im attaching to plgVmConfirmedOrder to process the user payment in my 3rd payment plugin is that ok?


pinochico

We developed a lot of payments plugins and for us guide we use the paypal plugin.

Then you have to look inside this plugin, how can you use. I'm not developer, only I understand logic solutions == I don't confirm your idea.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

ssc3

Assuming your payment flow looks something like this?

Credit card details are sent directly to payment provider using a modal iframe bypassing the Virtuemart shop and ensuring PCI compliance.
Token is returned in place of credit card details.
Submit button is clicked.
Order and payment token are sent to payment provider.

For a similar problem I added an event listener to submit button to open the modal iframe and allow the user to enter the credit card details.
If the credit card was verified and a token returned the checkout continued. If not the submit was cancelled.
However if you retrieve the token from your payment provider in plgVmConfirmedOrder you will find it easier and quicker to code.

Virtuemart Payment Plugins
https://plugins.online-store.co.uk

pinochico

QuoteCredit card details are sent directly to payment provider using a modal iframe bypassing the Virtuemart shop and ensuring PCI compliance.

NO,
customer don't fill credit card number on the shop.
We don't use this solution (fill credit card numbers and control token) and  I don't want INLINE version of payment gate on the shop (while we have this solution too) == is not trusted solution for customer.
Customer is redirect to the payment gate after click confirm order (and create order in backend) and next on payment gate fill credit card numbers.

You want to develop new payment gate?

Why do you don't try something existing, how function?
Or you can try testing version of payment gate - https://devel.zelenazeme.cz - we use gopay (https://help.gopay.com/en/knowledge-base/integration-of-payment-gateway/integration-of-payment-gateway-1/testing-payments-in-the-sandbox?embed=)

But if you find other solution, you have to continue in finding.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

ssc3

Quote from: pinochico on November 27, 2021, 01:53:57 AM
QuoteCredit card details are sent directly to payment provider using a modal iframe bypassing the Virtuemart shop and ensuring PCI compliance.
NO,
customer don't fill credit card number on the shop.

Actually Yes. This is the same payment flow as used by Authorize.Net Accept.

This is rated by Authorize.Net as a PCI compliant solution and is the recommended PCI replacement for Authorize.Net AIM which is now deprecated.
Virtuemart Payment Plugins
https://plugins.online-store.co.uk