Author Topic: Custom Payment Method Develop: can you help me?  (Read 3354 times)

Federcio2

  • Beginner
  • *
  • Posts: 8
  • A beginner
  • Skype Name: Federcio2-Kun
Custom Payment Method Develop: can you help me?
« on: November 13, 2015, 09:53:00 am »
Greetings to all,
I'm starting to develop a new method of payment for VirtueMart 3.0.10 (use Joomla 3.4.0).
In practice, the customer, after "Confirmation Order", is re-directed to the payment site by a post xml/html containing the order data (amount, etc.).

What I do not understand, looking the other payment methods integrated, is how/where to save the data I need and then, such as Paypal, make the call to the external page, taking with him the order number, amount, etc.

Someone can help me?

I appreciate any suggestions / help.

Thanks to those who will be kind enough to spend some time for me. :)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9223
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Custom Payment Method Develop: can you help me?
« Reply #1 on: November 13, 2015, 21:48:52 pm »
study the bundled Skrill plugin .. this is probably the simplest to understand
plugins\vmpayment\skrill\skrill.php
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4067
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3

Federcio2

  • Beginner
  • *
  • Posts: 8
  • A beginner
  • Skype Name: Federcio2-Kun
Re: Custom Payment Method Develop: can you help me?
« Reply #3 on: November 13, 2015, 22:29:57 pm »
study the bundled Skrill plugin .. this is probably the simplest to understand
plugins\vmpayment\skrill\skrill.php

Today I looked at the standard payment. If I understand correctly, in this case, after checkout the order is processed but there is no payment.
It's interesting, because to me it would be enough that, after clicking on "confirm order", make a post xml/html which redirects to the page I want.
But if you tell me that Skrill is more intuitive, I'll look too. :)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9223
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Custom Payment Method Develop: can you help me?
« Reply #4 on: November 13, 2015, 22:54:02 pm »
yes- standard isn't a payment.. it just stores the order and redirects to the thank you..
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Federcio2

  • Beginner
  • *
  • Posts: 8
  • A beginner
  • Skype Name: Federcio2-Kun
Re: Custom Payment Method Develop: can you help me?
« Reply #5 on: November 13, 2015, 22:59:36 pm »
yes- standard isn't a payment.. it just stores the order and redirects to the thank you..

Okay, thanks. When the customer presses the button "confirm order", which could be the function that is used for the post xml/html? :)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9223
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Custom Payment Method Develop: can you help me?
« Reply #6 on: November 13, 2015, 23:02:28 pm »
all in the skrill....   

function plgVmConfirmedOrder ($cart, $order) {
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Federcio2

  • Beginner
  • *
  • Posts: 8
  • A beginner
  • Skype Name: Federcio2-Kun
Re: Custom Payment Method Develop: can you help me?
« Reply #7 on: November 13, 2015, 23:06:58 pm »
all in the skrill....   

function plgVmConfirmedOrder ($cart, $order) {

Thank you man. ;)

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4067
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Custom Payment Method Develop: can you help me?
« Reply #8 on: November 14, 2015, 00:05:22 am »
Use debug, fonctionnality, or add break jexit('Im here');
We cannot do all the work for you. YOu have already main information to do your plugin

Federcio2

  • Beginner
  • *
  • Posts: 8
  • A beginner
  • Skype Name: Federcio2-Kun
Re: Custom Payment Method Develop: can you help me?
« Reply #9 on: November 14, 2015, 00:07:46 am »
Use debug, fonctionnality, or add break jexit('Im here');
We cannot do all the work for you. YOu have already main information to do your plugin

Yep, ok. Thanks!

Federcio2

  • Beginner
  • *
  • Posts: 8
  • A beginner
  • Skype Name: Federcio2-Kun
Re: Custom Payment Method Develop: can you help me?
« Reply #10 on: November 16, 2015, 16:11:19 pm »
Uhm... In Skrill ConfirmedOrder, there is an iframe, right?
There is a way to make a post form parameterized as a redirect to external site (like Paypal)?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4067
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Custom Payment Method Develop: can you help me?
« Reply #11 on: November 16, 2015, 17:25:19 pm »
TO redirect, you have to submit by javascript on document load.
Fiil all the form with your values(all can be type=hidden) and add a Javascript submit(); in your HTML
DO not remove the submit button, else when ajavascript is not active, you cannot submit the form

Federcio2

  • Beginner
  • *
  • Posts: 8
  • A beginner
  • Skype Name: Federcio2-Kun
Re: Custom Payment Method Develop: can you help me?
« Reply #12 on: November 19, 2015, 16:48:41 pm »
Awesome. :) First step is ok.

Two questions for ya:

- How do I create the fields to fill in the payment settings, admin side?
- How can I create the installation of the plugin?

Thank you for all your helps. :)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9223
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Custom Payment Method Develop: can you help me?
« Reply #13 on: November 19, 2015, 17:18:06 pm »
Honestly.. I think you hit the limit of free help here..
Your questions aren't even VM related.. have you read ANY documentation on how to build a Joomla plugin?????

VM plugs are Joomla plugs
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Federcio2

  • Beginner
  • *
  • Posts: 8
  • A beginner
  • Skype Name: Federcio2-Kun
Re: Custom Payment Method Develop: can you help me?
« Reply #14 on: November 19, 2015, 17:22:46 pm »
Ok, thanks anyway.  ;D