Changeset 623742
- Timestamp:
- 11/11/2012 05:42:46 PM (13 years ago)
- Location:
- paypal-express-checkout/trunk
- Files:
-
- 5 edited
-
classes/paypalapi.php (modified) (2 diffs)
-
form-handler.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
-
views/adminshortcode.php (modified) (1 diff)
-
views/frontendshortcode.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
paypal-express-checkout/trunk/classes/paypalapi.php
r620951 r623742 1 1 <?php 2 session_start(); 3 2 4 /** 3 5 * PayPal API … … 43 45 $fields['PAYMENTREQUEST_0_DESC'] = $_POST['PAYMENTREQUEST_0_DESC']; 44 46 47 if ( isset($_POST['RETURN_URL']) ) 48 $_SESSION['RETURN_URL'] = $_POST['RETURN_URL']; 49 50 if ( isset($_POST['CANCEL_URL']) ) 51 $fields['CANCELURL'] = $_POST['CANCEL_URL']; 52 45 53 if ( isset($_POST['PAYMENTREQUEST_0_QTY']) ) { 46 54 $fields['PAYMENTREQUEST_0_QTY0'] = $_POST['PAYMENTREQUEST_0_QTY']; -
paypal-express-checkout/trunk/form-handler.php
r620429 r623742 1 1 <?php 2 session_start(); 2 3 /** 3 4 * Form posting handler … … 8 9 if ( isset($_GET['func']) && $_GET['func'] == 'confirm' && isset($_GET['token']) && isset($_GET['PayerID']) ) { 9 10 HCCoder_PayPalAPI::ConfirmExpressCheckout(); 11 12 if ( isset( $_SESSION['RETURN_URL'] ) ) { 13 $url = $_SESSION['RETURN_URL']; 14 unset($_SESSION['RETURN_URL']); 15 header('Location: '.$url); 16 exit; 17 } 18 10 19 if ( is_numeric(get_option('paypal_success_page')) && get_option('paypal_success_page') > 0 ) 11 20 header('Location: '.get_permalink(get_option('paypal_success_page'))); -
paypal-express-checkout/trunk/readme.txt
r621748 r623742 5 5 Requires at least: 3.0.0 6 6 Tested up to: 3.4.2 7 Stable tag: 2.1. 07 Stable tag: 2.1.1 8 8 9 9 Easily add PayPal express checkout possibility to your WordPres powered blog. You can configure all options on WP Admin interface. … … 28 28 * specifiy shipping amount 29 29 * specifiy item quantity 30 * return URL 31 * cancel URL 32 33 = System requirements = 34 * PHP session support 35 * PHP cURL library 30 36 31 37 == Installation == … … 56 62 == Changelog == 57 63 64 = 2.1.1 = 65 * Now you can define return and cancel URL in shortcode 66 * Tested with WordPress 3.5 Beta 2 and works fine 67 58 68 = 2.1.0 = 59 69 * Error handling extended -
paypal-express-checkout/trunk/views/adminshortcode.php
r620951 r623742 38 38 [paypal amount=10 currency=USD description="Buying item SKU: QUANTITY = 4" qty=4] 39 39 </p> 40 41 <h3>Example #5</h3> 42 <p><i>Add custom return and cancel URL to your buttons.</i></p> 43 <p> 44 [paypal amount=10 currency=USD return_url="http://hccoder.info/" cancel_url="http://www.google.com"] 45 </p> 40 46 <?php } ?> 41 47 </div><!-- .wrap --> -
paypal-express-checkout/trunk/views/frontendshortcode.php
r620951 r623742 22 22 <?php } ?> 23 23 24 <?php if ( isset($atts['return_url']) ) { ?> 25 <input type="hidden" name="RETURN_URL" value="<?php echo $atts['return_url']; ?>" /> 26 <?php } ?> 27 28 <?php if ( isset($atts['cancel_url']) ) { ?> 29 <input type="hidden" name="CANCEL_URL" value="<?php echo $atts['cancel_url']; ?>" /> 30 <?php } ?> 31 24 32 <input type="hidden" name="func" value="start" /> 25 33 <input type="submit" value="Pay with PayPal" />
Note: See TracChangeset
for help on using the changeset viewer.