[Skip to main content](#vessel-content)

#   V12 Finance Plugin

##

- **[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")**
- [![Bobwales's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/30257-bobwales "View Bobwales's Profile") Topic Author
- [ Offline](/forum/user/30257-bobwales)

Less More

- Posts: 127
- Thank you received: 6
-
-

8 years 7 months ago [\#292085](#292085) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  *[V12 Finance Plugin](/forum/29-payment-methods/894600-v12-finance-plugin#292085 "-- HikaShop version -- : 3.2.2 -- Joomla version -- : 3.6.4 -- PHP version -- : 7.0.29  Hi Love the new checkout of Hikashop - much easier to configure and loads nicer for the user, desktop and mobile looking good! However, we have one payment plugin written for V12 Finance (very popular in the UK) which doesn't like the final step in the new checkout stages. The data isn't being passed to the V12 url, for some reason. On legacy all is well.  So, regrettably I have to revert to Checkout legacy.  I've looked hard for similar issues and in the support documentation for the changes that might have broken the plugin, but have drawn a blank so far. I realise it's beyond the scope of your support but if anyone has time to look at the plugin files (attached) it would be great to get it compatible with the new checkout. I'm also happy to share the work we've done here as a new payment plugin, which might help others, though it probably needs some little development to make it a full package. Attached, the plug-in files. Really hope you could take a look and point me in the right direction. The original developer has moved on but I have some skills and I'm keen to fix it. Regards, Bob")* was created by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")*

-- HikaShop version -- : 3.2.2
-- Joomla version -- : 3.6.4
-- PHP version -- : 7.0.29

Hi
Love the new checkout of Hikashop - much easier to configure and loads nicer for the user, desktop and mobile looking good!
However, we have one payment plugin written for V12 Finance (very popular in the UK) which doesn't like the final step in the new checkout stages. The data isn't being passed to the V12 url, for some reason. On legacy all is well.

So, regrettably I have to revert to Checkout legacy.

I've looked hard for similar issues and in the support documentation for the changes that might have broken the plugin, but have drawn a blank so far.
I realise it's beyond the scope of your support but if anyone has time to look at the plugin files (attached) it would be great to get it compatible with the new checkout.
I'm also happy to share the work we've done here as a new payment plugin, which might help others, though it probably needs some little development to make it a full package.
Attached, the plug-in files. Really hope you could take a look and point me in the right direction. The original developer has moved on but I have some skills and I'm keen to fix it.
Regards, Bob

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTQ2MDAtdjEyLWZpbmFuY2UtcGx1Z2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

8 years 7 months ago [\#292086](#292086) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[V12 Finance Plugin](/forum/29-payment-methods/894600-v12-finance-plugin#292086 "-- HikaShop version -- : 3.2.2 -- Joomla version -- : 3.6.4 -- PHP version -- : 7.0.29  Hi Love the new checkout of Hikashop - much easier to configure and loads nicer for the user, desktop and mobile looking good! However, we have one payment plugin written for V12 Finance (very popular in the UK) which doesn't like the final step in the new checkout stages. The data isn't being passed to the V12 url, for some reason. On legacy all is well.  So, regrettably I have to revert to Checkout legacy.  I've looked hard for similar issues and in the support documentation for the changes that might have broken the plugin, but have drawn a blank so far. I realise it's beyond the scope of your support but if anyone has time to look at the plugin files (attached) it would be great to get it compatible with the new checkout. I'm also happy to share the work we've done here as a new payment plugin, which might help others, though it probably needs some little development to make it a full package. Attached, the plug-in files. Really hope you could take a look and point me in the right direction. The original developer has moved on but I have some skills and I'm keen to fix it. Regards, Bob")*

Hi,

I don't see how your plugin can work at all.
In its v12_end.php file, it displays a form for the end step of the checkout.
This form has javascript code added to it in order to submit the form content through AJAX and the com_ajax system of Joomla ([ docs.joomla.org/Using\_Joomla\_Ajax\_Interface](https://docs.joomla.org/Using_Joomla_Ajax_Interface)) to a separate ajax/v12 plugin to process the data with the payment gateway and return a URL where to redirect the customer. So without that separate plugin it's impossible this payment plugin would work.

Besides that, I didn't see anything particular which would make that plugin not work with the new checkout so if there is something it must be an easy thing to fix. But without being able to test, and without you telling us exactly how it doesn't work with the new checkout, it's hard to say much on that end. What error message did you get ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTQ2MDAtdjEyLWZpbmFuY2UtcGx1Z2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")**
- [![Bobwales's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/30257-bobwales "View Bobwales's Profile") Topic Author
- [ Offline](/forum/user/30257-bobwales)

Less More

- Posts: 127
- Thank you received: 6
-
-

8 years 7 months ago -  8 years 7 months ago [\#292125](#292125) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  Replied by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")* on topic *[V12 Finance Plugin](/forum/29-payment-methods/894600-v12-finance-plugin#292125 "-- HikaShop version -- : 3.2.2 -- Joomla version -- : 3.6.4 -- PHP version -- : 7.0.29  Hi Love the new checkout of Hikashop - much easier to configure and loads nicer for the user, desktop and mobile looking good! However, we have one payment plugin written for V12 Finance (very popular in the UK) which doesn't like the final step in the new checkout stages. The data isn't being passed to the V12 url, for some reason. On legacy all is well.  So, regrettably I have to revert to Checkout legacy.  I've looked hard for similar issues and in the support documentation for the changes that might have broken the plugin, but have drawn a blank so far. I realise it's beyond the scope of your support but if anyone has time to look at the plugin files (attached) it would be great to get it compatible with the new checkout. I'm also happy to share the work we've done here as a new payment plugin, which might help others, though it probably needs some little development to make it a full package. Attached, the plug-in files. Really hope you could take a look and point me in the right direction. The original developer has moved on but I have some skills and I'm keen to fix it. Regards, Bob")*

Thanks for looking Nicolas
It actually has been working for over a year and we have had many sales this way.

The error message comes from v12_end.php:
'There was a problem with the application submission. Please contact us to manually create your order.'

In context:
Code:

// process the form jQuery('form#hikashop_v12_form').submit(function(event) { //Disable the submit button jQuery('#hikashop_v12_button').attr('disabled', 'disabled'); // get the form data // there are many ways to get this data using jQuery (you can use the class or id also) var formData = { 'product_id' : jQuery('input[name="period"]:checked').val(), 'deposit' : jQuery('input[name=deposit]').val(), 'data' : jQuery('input[name=data]').val() }; // process the form jQuery.ajax({ type : 'post', url : '?option=com_ajax&amp;plugin=v12&amp;format=json', data : formData, dataType : 'json', encode : true }).done(function(data) { // log data to the console so we can see console.log(data); if (data.success) { if(data.data[0].formUrl) { jQuery('#application_link').attr("href", data.data[0].formUrl); //Hide the form and show the application link jQuery('#hikashop_v12_form').hide( "slow",function(){ jQuery('#ajax-response-success').show("slow"); //Click the link after 5 seconds setTimeout(function(){ //Use window open as a click event will bind to the link before it has an href value window.open(data.data[0].formUrl); }, 5000); }); } else if (data.data[0].noapplication) { //V12 didn't return an application link jQuery('#hikashop_v12_form').hide( "slow",function(){ jQuery('#ajax-response-error').show("slow"); jQuery('#ajax-error-message').html('There was a problem with the application submission. Please contact us to manually create your order.'); }); ...and more...

This message contains confidential information

On the live site the V12 payment is enabled and working with the legacy checkout enabled.
On my staging site checkout legacy is switched off. Otherwise they are the same Hikashop Configuration (caches are off on the staging site).

Nicolas, it is good of you to look at this, especially on May 1st and quite late in the evening. There is no rush at all - the live site is happy.
Kind regards
Bob

Last edit: 8 years 7 months ago by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTQ2MDAtdjEyLWZpbmFuY2UtcGx1Z2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

8 years 7 months ago [\#292139](#292139) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[V12 Finance Plugin](/forum/29-payment-methods/894600-v12-finance-plugin#292139 "-- HikaShop version -- : 3.2.2 -- Joomla version -- : 3.6.4 -- PHP version -- : 7.0.29  Hi Love the new checkout of Hikashop - much easier to configure and loads nicer for the user, desktop and mobile looking good! However, we have one payment plugin written for V12 Finance (very popular in the UK) which doesn't like the final step in the new checkout stages. The data isn't being passed to the V12 url, for some reason. On legacy all is well.  So, regrettably I have to revert to Checkout legacy.  I've looked hard for similar issues and in the support documentation for the changes that might have broken the plugin, but have drawn a blank so far. I realise it's beyond the scope of your support but if anyone has time to look at the plugin files (attached) it would be great to get it compatible with the new checkout. I'm also happy to share the work we've done here as a new payment plugin, which might help others, though it probably needs some little development to make it a full package. Attached, the plug-in files. Really hope you could take a look and point me in the right direction. The original developer has moved on but I have some skills and I'm keen to fix it. Regards, Bob")*

Hi,

As I said in my previous message, looking at the code of your plugin, it requires another plugin of the group "ajax" also called v12 to work properly. And the issue happens in that ajax plugin based on what you're saying.
So we would need also the code of that second plugin to be able to say anything useful.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTQ2MDAtdjEyLWZpbmFuY2UtcGx1Z2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")**
- [![Bobwales's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/30257-bobwales "View Bobwales's Profile") Topic Author
- [ Offline](/forum/user/30257-bobwales)

Less More

- Posts: 127
- Thank you received: 6
-
-

8 years 7 months ago [\#292153](#292153) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  Replied by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")* on topic *[V12 Finance Plugin](/forum/29-payment-methods/894600-v12-finance-plugin#292153 "-- HikaShop version -- : 3.2.2 -- Joomla version -- : 3.6.4 -- PHP version -- : 7.0.29  Hi Love the new checkout of Hikashop - much easier to configure and loads nicer for the user, desktop and mobile looking good! However, we have one payment plugin written for V12 Finance (very popular in the UK) which doesn't like the final step in the new checkout stages. The data isn't being passed to the V12 url, for some reason. On legacy all is well.  So, regrettably I have to revert to Checkout legacy.  I've looked hard for similar issues and in the support documentation for the changes that might have broken the plugin, but have drawn a blank so far. I realise it's beyond the scope of your support but if anyone has time to look at the plugin files (attached) it would be great to get it compatible with the new checkout. I'm also happy to share the work we've done here as a new payment plugin, which might help others, though it probably needs some little development to make it a full package. Attached, the plug-in files. Really hope you could take a look and point me in the right direction. The original developer has moved on but I have some skills and I'm keen to fix it. Regards, Bob")*

Ah, I see.
I will take a look at the files in the V12 folder within the Ajax Plugin. It's attached too, if you want to follow up - like I say, I think it would be a good addition to the Payment Methods of Hikashop, but needs a little more work - clearly, beyond my skills to make into a robust package.

Thanks again Nicolas

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTQ2MDAtdjEyLWZpbmFuY2UtcGx1Z2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

8 years 7 months ago [\#292162](#292162) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[V12 Finance Plugin](/forum/29-payment-methods/894600-v12-finance-plugin#292162 "-- HikaShop version -- : 3.2.2 -- Joomla version -- : 3.6.4 -- PHP version -- : 7.0.29  Hi Love the new checkout of Hikashop - much easier to configure and loads nicer for the user, desktop and mobile looking good! However, we have one payment plugin written for V12 Finance (very popular in the UK) which doesn't like the final step in the new checkout stages. The data isn't being passed to the V12 url, for some reason. On legacy all is well.  So, regrettably I have to revert to Checkout legacy.  I've looked hard for similar issues and in the support documentation for the changes that might have broken the plugin, but have drawn a blank so far. I realise it's beyond the scope of your support but if anyone has time to look at the plugin files (attached) it would be great to get it compatible with the new checkout. I'm also happy to share the work we've done here as a new payment plugin, which might help others, though it probably needs some little development to make it a full package. Attached, the plug-in files. Really hope you could take a look and point me in the right direction. The original developer has moved on but I have some skills and I'm keen to fix it. Regards, Bob")*

Hi,

Thanks. With the whole code, it makes more sense.
I would however be very wary using that plugin (and actually I wouldn't use it on one of my websites).
Looking at the code, there is no security at all. This means that:
- anyone can easily confirm an order himself on your website by just creating the correct link and opening it in its browser, without making any payment.
- anyone can change the amount of the payment after the order is created so that the amount paid is different than the total amount of the order and the plugin would still validate the order.
So after every confirmed order, you should check that the payment has really been made before sending any goods or providing any service.
To do it properly, I'm afraid it would require a complete rewrite.

Regarding the issue, it comes during the call to the payment gateway to get the redirection URL. Something goes wrong. Unfortunately, the code of the plugin doesn't have any debug capability to actually get the error message returned by the payment gateway. Instead, it just displays its own error message.
So to be able to fix the issue would require some code modification and debugging.
Clearely, it's not just something I could do in a few minutes but will require several hours of development/testing.
I can provide some tips to get you started if you're a developer:
look at the XHR request with your browser's developer tools on the end step of the checkout when you submit the payment form and get that error. In the networks tab, you can see it, along with the response from the server.
It contains the "request" and the "response" from the request made to the payment gateway which will contain the real error message. You can then go from there.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTQ2MDAtdjEyLWZpbmFuY2UtcGx1Z2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")**
- [![Bobwales's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/30257-bobwales "View Bobwales's Profile") Topic Author
- [ Offline](/forum/user/30257-bobwales)

Less More

- Posts: 127
- Thank you received: 6
-
-

7 years 10 months ago -  7 years 10 months ago [\#302639](#302639) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  Replied by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")* on topic *[V12 Finance Plugin](/forum/29-payment-methods/894600-v12-finance-plugin#302639 "-- HikaShop version -- : 3.2.2 -- Joomla version -- : 3.6.4 -- PHP version -- : 7.0.29  Hi Love the new checkout of Hikashop - much easier to configure and loads nicer for the user, desktop and mobile looking good! However, we have one payment plugin written for V12 Finance (very popular in the UK) which doesn't like the final step in the new checkout stages. The data isn't being passed to the V12 url, for some reason. On legacy all is well.  So, regrettably I have to revert to Checkout legacy.  I've looked hard for similar issues and in the support documentation for the changes that might have broken the plugin, but have drawn a blank so far. I realise it's beyond the scope of your support but if anyone has time to look at the plugin files (attached) it would be great to get it compatible with the new checkout. I'm also happy to share the work we've done here as a new payment plugin, which might help others, though it probably needs some little development to make it a full package. Attached, the plug-in files. Really hope you could take a look and point me in the right direction. The original developer has moved on but I have some skills and I'm keen to fix it. Regards, Bob")*

Thank you Nicolas - I've now got some quiet time to pick this up again (the bike business is quiet at this time of year). And it would be fantastic to use the new checkout, rather than the old legacy checkout which is not throwing the error.

Following your advice I can see the following error

"Undefined property: stdClass::$order_id in /home/juicebik/staging/6/plugins/hikashoppayment/v12/v12.php on line 170 "

which refers to this code:

$vars = array(
'CashPrice' =&gt; $amount,
'vLink' =&gt; $this-&gt;payment_params-&gt;vlink,
'DuplicateSalesReferenceMethod' =&gt; 'ShowOriginalApplication',
'SalesReference' =&gt; $order-&gt;cart-&gt;order_id,
);

Changing that to:

$vars = array(
'CashPrice' =&gt; $amount,
'vLink' =&gt; $this-&gt;payment_params-&gt;vlink,
'DuplicateSalesReferenceMethod' =&gt; 'ShowOriginalApplication',
/*'SalesReference' =&gt; $order-&gt;cart-&gt;order_id,*/
'SalesReference' =&gt; $this-&gt;order-&gt;order_id,
);

Seems to fix the issue and instantiate the SalesReference which was the issue shown in the console.

So, thanks for your detailed help once again and apologies for the delay in getting back to you.

Last edit: 7 years 10 months ago by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile").

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTQ2MDAtdjEyLWZpbmFuY2UtcGx1Z2luP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.062 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
