Author Topic: Prevent submit of checkout form  (Read 528 times)

diego.sorribas

  • Beginner
  • *
  • Posts: 2
  • A beginner
Prevent submit of checkout form
« on: November 22, 2021, 18:50:38 pm »
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

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1269
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Prevent submit of checkout form
« Reply #1 on: November 22, 2021, 19:48:41 pm »
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 from products, orders and database table
Virtuemart Email Manager - customs email templates

diego.sorribas

  • Beginner
  • *
  • Posts: 2
  • A beginner
Re: Prevent submit of checkout form
« Reply #2 on: November 22, 2021, 22:56:12 pm »
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

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1269
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Prevent submit of checkout form
« Reply #3 on: November 22, 2021, 23:08:08 pm »
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 from products, orders and database table
Virtuemart Email Manager - customs email templates

ssc3

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 161
    • Online Store Plugins
Re: Prevent submit of checkout form
« Reply #4 on: November 26, 2021, 15:39:39 pm »
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.


pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1269
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Prevent submit of checkout form
« Reply #5 on: November 27, 2021, 01:53:57 am »
Quote
Credit 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 from products, orders and database table
Virtuemart Email Manager - customs email templates

ssc3

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 161
    • Online Store Plugins
Re: Prevent submit of checkout form
« Reply #6 on: November 29, 2021, 15:28:44 pm »
Quote
Credit 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.