Skip to content

Commit

Permalink
Merge pull request #11 from ionutcalara/master
Browse files Browse the repository at this point in the history
Add one page checkout script, minor fixes
  • Loading branch information
ionutcalara authored Jun 2, 2020
2 parents c298824 + 1d5bf96 commit 961ca94
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
Binary file modified paylike.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion paylike/paylike.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

class plgVmPaymentPaylike extends vmPSPlugin {

public $version = '2.0.0.3';
public $version = '2.0.0.4';
static $IDS = array();
protected $_isInList = false;
function __construct (& $subject, $config) {
Expand Down
8 changes: 4 additions & 4 deletions paylike/paylike.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<extension version="2.5" type="plugin" group="vmpayment" method="upgrade">
<name>VM - Payment, Paylike Version 2</name>
<creationDate>April 2020</creationDate>
<creationDate>25 May 2020</creationDate>
<author>Patrick Kohl</author>
<authorUrl>http://shop.st42.fr</authorUrl>
<copyright>Copyright (C) 2018 STUDIO42 France. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<version>2.0.0.3</version>
<description><![CDATA[<a href="http://paylike.com" target="_blank">Paylike</a> is a popular
<version>2.0.0.4</version>
<description><![CDATA[<a href="http://paylike.com" target="_blank">Paylke</a> is a popular
payment provider. ]]>
</description>
<!-- Include plugin files and folders -->
Expand Down Expand Up @@ -80,7 +80,7 @@
<option value="mastercard">MasterCard</option>
<option value="maestro">Maestro</option>
<option value="visa">Visa</option>
<option value="viselectron">Visa Electron</option>
<option value="visaelectron">Visa Electron</option>
</field>
<field name="mastercard" type="filelist" hide_none="true" hide_default="true" directory='plugins/vmpayment/paylike/images/' label="VMPAYMENT_PAYLIKE_MASTERCARD_LOGO" description=""
default="mastercard.svg"/>
Expand Down
13 changes: 13 additions & 0 deletions paylike/tmpl/pay_before.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

<?php
defined ('_JEXEC') or die();

Expand All @@ -22,4 +23,16 @@
?>
<script>
vmPaylike.method["ID<?php echo $method->virtuemart_paymentmethod_id ?>"] = <?php echo $method->virtuemart_paymentmethod_id; ?>;
<?php if (JPluginHelper::isEnabled('system', 'vponepagecheckout')) { ?>
jQuery(document).ready(function($) {
$(document).on('vpopc.event', function(event, type) {
if (type == 'checkout.orderVerification.success') {
$('<input />').attr('type', 'hidden').attr('name', 'confirm').attr('id', 'checkoutFormSubmit').val('1').appendTo($('#checkoutForm'));
} else {
$('input#checkoutFormSubmit').remove();
}
});
});
<?php } ?>

</script>

0 comments on commit 961ca94

Please sign in to comment.