Rev 6619 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php
/**
* JS Teil für den PayPal PLUS Teil
*/
// https://www.paypalobjects.com/webstatic/de_DE/downloads/PayPal-PLUS-IntegrationGuide.pdf
?>
var ppp = PAYPAL.apps.PPP({
"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",
<?php if ($this->hasMod('wpsg_mod_onepagecheckout') && wpsg_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",
"disableContinue": "<?php echo $this->view['wpsg_mod_paypalapi']['disableContinue']; ?>",
"enableContinue": "<?php echo $this->view['wpsg_mod_paypalapi']['enableContinue']; ?>",
<?php if (wpsg_isSizedArray($this->view['wpsg_mod_paypalapi']['ThirdPartyPayment'])) { ?>
"thirdPartyPaymentMethods": <?php echo json_encode($this->view['wpsg_mod_paypalapi']['ThirdPartyPayment']); ?>,
<?php } ?>
<?php } ?>
"placeholder": "wpsg_ppplus",
"mode": "<?php echo $this->view['wpsg_mod_paypalapi']['mode']; ?>",
} );