Subversion Repositories wpShopGermany4

Rev

Rev 7068 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4993 daniel 1
<?php
2
 
3
	/**
4
	 * Template um die Zahlungsarten mittels PayPal PLUS im Checkout zu integrieren
5
	 */
6
 
7
?>
8
 
9
<?php if ($this->view['wpsg_mod_paypalapi']['show'] == 1) { ?>
10
 
5017 daniel 11
	<div class="wpsg_payment">
12
		<h2><?php echo __('Zahlungsarten', 'wpsg'); ?></h2>
5018 daniel 13
		<div class="wpsg_payment_textwrap">
7068 thomas 14
			<p><?php echo __('Ihr PayPal Konto wird nach Bestellabschluss belastet.', 'wpsg'); ?></p>
5018 daniel 15
		</div>
5017 daniel 16
	</div>
4993 daniel 17
 
18
<?php } else if ($this->view['wpsg_mod_paypalapi']['show'] == 2) { ?>
19
 
5017 daniel 20
	<div class="wpsg_payment">
21
		<h2><?php echo __('Zahlung erneut authorisieren', 'wpsg'); ?></h2>
5018 daniel 22
		<div class="wpsg_payment_textwrap">
23
 
24
			<p><?php echo __('Der Betrag der Bestellung hat sich verändert. Sie müssen die Zahlung mit PayPal erneut authorisieren.', 'wpsg'); ?></p>
7068 thomas 25
			<p><?php echo __('Dies können Sie über folgenden Button erledigen oder nach Bestellabschluss. Alternativ können Sie unten auch eine andere Zahlungsart wählen.', 'wpsg'); ?>
4993 daniel 26
 
5018 daniel 27
			<div class="wrap_paypalapi_expressbutton">
28
				<a href="<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'startPayPalExpress'); ?>" title="<?php echo __('Direkt mit PayPal bezahlen', 'wpsg'); ?>"><img src="<?php echo $this->getRessourceURL('mods/mod_paypalapi/gfx/checkout-logo-small-de.png'); ?>" alt="<?php echo __('Direkt zu PayPal', 'wpsg'); ?>" /></a>
29
			</div>
5017 daniel 30
		</div>
4993 daniel 31
	</div>
32
 
33
<?php } else { ?>
34
 
5010 daniel 35
	<script src="https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js" type="text/javascript"></script>
4993 daniel 36
 
5016 daniel 37
	<div class="wpsg_payment">
4993 daniel 38
 
5016 daniel 39
		<h2><?php echo __('Zahlungsarten', 'wpsg'); ?></h2>
5010 daniel 40
 
41
		<div id="wpsg_ppplus"></div>
5233 daniel 42
 
5234 daniel 43
		<?php if (wpsg_isSizedString($this->view['wpsg_mod_paypalapi']['error'])) { ?>
5382 daniel 44
		<div id="wpsg_notice" class="published error">
5234 daniel 45
			<p><?php echo $this->view['wpsg_mod_paypalapi']['error']; ?>
46
		</div>
5233 daniel 47
		<?php } ?>
5010 daniel 48
 
49
	</div>
5382 daniel 50
 
51
	<iframe name="wpsg_hiddenTarget" style="display:none; width:0px; height:0px;"></iframe>
5010 daniel 52
	<script type="application/javascript">/* <![CDATA[ */
5382 daniel 53
 
54
		function wpsg_ppp_handleError()
55
		{
56
 
57
			location.href = '<?php echo $this->getUrl(wpsg_ShopController::URL_CHECKOUT); ?>';
58
 
59
		}
60
 
61
		function wpsg_ppp_run()
62
		{
63
 
64
			PAYPAL.apps.PPP.doCheckout();
65
 
66
		}
5010 daniel 67
 
68
		var wpsg_mod_paypalapi_shipping_id = '<?php echo wpsg_getStr($this->view['basket']['checkout']['shipping']); ?>';
69
 
70
		jQuery(document).ready(function() {
71
 
72
			jQuery('input[name="wpsg_checkout2"], input[name="wpsg_checkout"]').hide();
73
 
7032 daniel 74
			jQuery('.shippay_item_wrap input[type="radio"]').bind('change', function() {
5010 daniel 75
 
76
				if (jQuery(this).val() != wpsg_mod_paypalapi_shipping_id)
77
				{
78
 
79
					jQuery('input[name="wpsg_checkout2"]').hide()
8040 karl 80
					jQuery('#wpsg_checkout_form').attr("action", "<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'ShippingSelect'); ?>").trigger('submit');
5010 daniel 81
 
82
				}
4993 daniel 83
 
5010 daniel 84
			} );
4993 daniel 85
 
86
		} );
5010 daniel 87
 
88
		/**
89
		 * Wird vom PayPal PLUS IFrame aufgerufen wenn fertig geladen
90
		 */
91
		function wpsg_mod_paypalapi_load()
92
		{
93
 
94
			jQuery('input[name="wpsg_checkout2"], input[name="wpsg_checkout"]').show().bind('click', function() {
95
 
5382 daniel 96
				PAYPAL.apps.PPP.doCheckout();
5010 daniel 97
				return false;
98
 
99
			} );
4993 daniel 100
 
5010 daniel 101
		}
4993 daniel 102
 
5010 daniel 103
		<?php echo $this->render(WPSG_PATH_VIEW.'/mods/mod_paypalapi/paypalplus.phtml')?>
104
 
105
	/* ]]> */</script>
106
 
4993 daniel 107
<?php } ?>