diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2016-03-04 21:04:26 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2016-03-04 21:04:26 +0000 |
| commit | 703a450908599b3ebc8018f41f54e510bb0dc255 (patch) | |
| tree | 49bdecd86495d4f15820802ead31b7baf1517c70 /views/mods/mod_paypalapi | |
| parent | 8c4618b68927c9d7f8c4e3bd18bf7a5b04f3bd4c (diff) | |
- Übernahme neuer Funktionen aus dem alten Zweig / Pfad / Einstellungen / Hilfe Icons / Berechnung
- Neuer Modulfilter im neuen Backend
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5382 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_paypalapi')
| -rw-r--r-- | views/mods/mod_paypalapi/checkout_handlePayment.phtml | 21 | ||||
| -rw-r--r-- | views/mods/mod_paypalapi/paypalplus.phtml | 17 | ||||
| -rw-r--r-- | views/mods/mod_paypalapi/settings_edit.phtml | 14 |
3 files changed, 47 insertions, 5 deletions
diff --git a/views/mods/mod_paypalapi/checkout_handlePayment.phtml b/views/mods/mod_paypalapi/checkout_handlePayment.phtml index adb02e3..4a87103 100644 --- a/views/mods/mod_paypalapi/checkout_handlePayment.phtml +++ b/views/mods/mod_paypalapi/checkout_handlePayment.phtml @@ -41,14 +41,29 @@ <div id="wpsg_ppplus"></div>
<?php if (wpsg_isSizedString($this->view['wpsg_mod_paypalapi']['error'])) { ?>
- <div id="wpsg_error" class="published error">
+ <div id="wpsg_notice" class="published error">
<p><?php echo $this->view['wpsg_mod_paypalapi']['error']; ?>
</div>
<?php } ?>
</div>
-
+
+ <iframe name="wpsg_hiddenTarget" style="display:none; width:0px; height:0px;"></iframe>
<script type="application/javascript">/* <![CDATA[ */
+
+ function wpsg_ppp_handleError()
+ {
+
+ location.href = '<?php echo $this->getUrl(wpsg_ShopController::URL_CHECKOUT); ?>';
+
+ }
+
+ function wpsg_ppp_run()
+ {
+
+ PAYPAL.apps.PPP.doCheckout();
+
+ }
var wpsg_mod_paypalapi_shipping_id = '<?php echo wpsg_getStr($this->view['basket']['checkout']['shipping']); ?>';
@@ -78,7 +93,7 @@ jQuery('input[name="wpsg_checkout2"], input[name="wpsg_checkout"]').show().bind('click', function() {
- var test = ppp.doContinue();
+ PAYPAL.apps.PPP.doCheckout();
return false;
} );
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",
diff --git a/views/mods/mod_paypalapi/settings_edit.phtml b/views/mods/mod_paypalapi/settings_edit.phtml index 7efb3d2..55e15de 100644 --- a/views/mods/mod_paypalapi/settings_edit.phtml +++ b/views/mods/mod_paypalapi/settings_edit.phtml @@ -63,8 +63,20 @@ <br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_aktiv', __('PayPal für neue Bestellungen erlauben', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_aktiv'), array('help' => 'wpsg_shippay_activ')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress', __('PayPal Express aktivieren (Button im Warenkorb)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress'), array('help' => 'wpsg_mod_paypalapi_paypalexpress')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_plus_aktiv', __('PayPal Plus aktivieren', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_plus_aktiv'), array('help' => 'wpsg_mod_paypalapi_plus_aktiv')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress', __('PayPal Express aktivieren (Button im Warenkorb)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress'), array('help' => 'wpsg_mod_paypalapi_paypalexpress')); ?>
+<div class="wpsg_mod_paypalapi_plus_aktiv">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress_forceSSL', __('SSL für ReturnURL erzwingen', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_forceSSL'), array('help' => 'wpsg_mod_paypalapi_paypalexpress_forceSSL')); ?>
+ <?php echo wpsg_drawForm_Input('', __('Return URL', 'wpsg'), $this->getUrl(
+ wpsg_ShopController::URL_BASKET,
+ 'wpsg_mod_paypalapi',
+ 'startPayPalExpress',
+ array(),
+ ((wpsg_isSizedInt($this->get_option('wpsg_mod_paypalapi_paypalexpress_forceSSL')))?true:false)
+ ), array('readonly' => true, 'help' => 'wpsg_mod_paypalapi_paypalexpress_returnurl')); ?>
+ <br />
+</div>
+
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress_details', __('Warenkorbdetails übertragen', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_details'), array('help' => 'wpsg_mod_paypalapi_paypalexpress_details')); ?>
<br />
|
