summaryrefslogtreecommitdiff
path: root/views/mods/mod_paypalapi/paypalplus.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'views/mods/mod_paypalapi/paypalplus.phtml')
-rw-r--r--views/mods/mod_paypalapi/paypalplus.phtml17
1 files changed, 16 insertions, 1 deletions
diff --git a/views/mods/mod_paypalapi/paypalplus.phtml b/views/mods/mod_paypalapi/paypalplus.phtml
index 2cecd3b..f9efe0d 100644
--- a/views/mods/mod_paypalapi/paypalplus.phtml
+++ b/views/mods/mod_paypalapi/paypalplus.phtml
@@ -12,7 +12,22 @@
"approvalUrl": "<?php echo $this->view['wpsg_mod_paypalapi']['approval_url']; ?>",
"language": "de_DE",
"preselection": "<?php echo (($_SESSION['wpsg']['checkout']['payment'] == '10')?'paypal':'none')?>",
- "country": "DE",
+ "country": "DE",
+ <?php if ($this->hasMod('wpsg_mod_onepagecheckout') && get_the_id() == $this->get_option('wpsg_mod_onepagecheckout_page')) { ?>
+ "onContinue": function(event) {
+
+ jQuery('#wpsg_basket_form').attr('target', 'wpsg_hiddenTarget');
+ jQuery('#wpsg_basket_form').append('<input name="wpsg_checkout" value="ppp" id="wpsg_hidden_action" />');
+ jQuery('#wpsg_basket_form').append('<input name="wpsg[checkout][payment]" value="ppp" id="wpsg_hidden_payment" />');
+ jQuery('#wpsg_basket_form').submit();
+ jQuery('#wpsg_basket_form').removeAttr('target');
+ jQuery('#wpsg_hidden_action').remove();
+ jQuery('#wpsg_hidden_payment').remove();
+
+ //PAYPAL.apps.PPP.doCheckout();
+
+ },
+ <?php } ?>
<?php if ($this->view['wpsg_order_done'] !== true) { ?>
"onLoad": function() { if (typeof wpsg_mod_paypalapi_load == 'function') wpsg_mod_paypalapi_load(); },
"buttonLocation": "outside",