WP Easy Paypal Payment Accept - Version 3.3

Version Description

  • Added an option in the shortcode to specify a payment subject. This can be handy if you have multiple payment widgets on your site.
  • WordPress 3.7 compatibility
  • Fixed some deprecated calls
Download this release

Release Info

Developer mra13
Plugin Icon 128x128 WP Easy Paypal Payment Accept
Version 3.3
Comparing to
See all releases

Code changes from version 3.2 to 3.3

Files changed (3) hide show
  1. WP_Accept_Paypal_Payment.php +6 -6
  2. readme.txt +11 -4
  3. shortcode_view.php +14 -1
WP_Accept_Paypal_Payment.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: WP Easy Paypal Payment Accept
4
- Version: v3.2
5
  Plugin URI: http://www.tipsandtricks-hq.com/?p=120
6
  Author: Tips and Tricks HQ
7
  Author URI: http://www.tipsandtricks-hq.com/
@@ -9,7 +9,7 @@ Description: Easy to use Wordpress plugin to accept paypal payment for a service
9
  License: GPL2
10
  */
11
 
12
- define('WP_PAYPAL_PAYMENT_ACCEPT_PLUGIN_VERSION', '3.2');
13
 
14
  include_once('shortcode_view.php');
15
 
@@ -28,7 +28,7 @@ add_option('payment_button_type', 'https://www.paypal.com/en_US/i/btn/btn_paynow
28
  add_option('wp_pp_show_other_amount', '-1');
29
  add_option('wp_pp_show_ref_box', '1');
30
  add_option('wp_pp_ref_title', 'Your Email Address');
31
- add_option('wp_pp_return_url', get_bloginfo('home'));
32
 
33
  add_shortcode('wp_paypal_payment_box', 'wpapp_buy_now_button_shortcode' );
34
  function wpapp_buy_now_button_shortcode($args)
@@ -70,6 +70,7 @@ function Paypal_payment_accept()
70
  $wp_pp_return_url = get_option('wp_pp_return_url');
71
 
72
  /* === Paypal form === */
 
73
  $output .= '<div id="accept_paypal_payment_form">';
74
  $output .= '
75
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
@@ -132,7 +133,7 @@ function Paypal_payment_accept()
132
  }
133
  else
134
  {
135
- $output .='<input type="hidden" name="return" value="'. get_bloginfo('home') .'" />';
136
  }
137
 
138
  $output .= "<input type=\"image\" src=\"$payment_button\" name=\"submit\" alt=\"Make payments with payPal - it's fast, free and secure!\" />";
@@ -152,11 +153,10 @@ function wp_ppp_process($content)
152
  return $content;
153
  }
154
 
155
-
156
  // Displays PayPal Payment Accept Options menu
157
  function paypal_payment_add_option_pages() {
158
  if (function_exists('add_options_page')) {
159
- add_options_page('WP Paypal Payment Accept', 'WP PayPal Payment', 8, __FILE__, 'paypal_payment_options_page');
160
  }
161
  }
162
 
1
  <?php
2
  /*
3
  Plugin Name: WP Easy Paypal Payment Accept
4
+ Version: v3.3
5
  Plugin URI: http://www.tipsandtricks-hq.com/?p=120
6
  Author: Tips and Tricks HQ
7
  Author URI: http://www.tipsandtricks-hq.com/
9
  License: GPL2
10
  */
11
 
12
+ define('WP_PAYPAL_PAYMENT_ACCEPT_PLUGIN_VERSION', '3.3');
13
 
14
  include_once('shortcode_view.php');
15
 
28
  add_option('wp_pp_show_other_amount', '-1');
29
  add_option('wp_pp_show_ref_box', '1');
30
  add_option('wp_pp_ref_title', 'Your Email Address');
31
+ add_option('wp_pp_return_url', home_url());
32
 
33
  add_shortcode('wp_paypal_payment_box', 'wpapp_buy_now_button_shortcode' );
34
  function wpapp_buy_now_button_shortcode($args)
70
  $wp_pp_return_url = get_option('wp_pp_return_url');
71
 
72
  /* === Paypal form === */
73
+ $output = '';
74
  $output .= '<div id="accept_paypal_payment_form">';
75
  $output .= '
76
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
133
  }
134
  else
135
  {
136
+ $output .='<input type="hidden" name="return" value="'. home_url() .'" />';
137
  }
138
 
139
  $output .= "<input type=\"image\" src=\"$payment_button\" name=\"submit\" alt=\"Make payments with payPal - it's fast, free and secure!\" />";
153
  return $content;
154
  }
155
 
 
156
  // Displays PayPal Payment Accept Options menu
157
  function paypal_payment_add_option_pages() {
158
  if (function_exists('add_options_page')) {
159
+ add_options_page('WP Paypal Payment Accept', 'WP PayPal Payment', 'manage_options', __FILE__, 'paypal_payment_options_page');
160
  }
161
  }
162
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === WP Easy Paypal Payment Accept ===
2
  Contributors: Ruhul Amin, Tips and Tricks HQ
3
  Donate link: http://www.tipsandtricks-hq.com
4
- Tags: Paypal payment, Accept payment for services or product, PayPal donation, wordpress paypal, paypal for wordpress, paypal plugin for wordpress, paypal integration, paypal, buy now
5
  Requires at least: 3.0
6
- Tested up to: 3.6.1
7
- Stable tag: 3.2
8
  License: GPLv2 or later
9
 
10
  Easy to use Wordpress plugin to accept paypal payment for a service or product or donation in one click
@@ -13,7 +13,7 @@ Easy to use Wordpress plugin to accept paypal payment for a service or product o
13
 
14
  Easy to use Wordpress plugin to accept paypal payment for a service or product or donation in one click. Can be used in the sidebar, posts and pages of your site.
15
 
16
- For information, detailed documentation and updates, please visit the [WordPress PayPal Payment](http://www.tipsandtricks-hq.com/?p=120) Plugin Page
17
 
18
  * Quick installation and setup.
19
  * Easily take payment for a service from your site via PayPal.
@@ -24,9 +24,11 @@ For information, detailed documentation and updates, please visit the [WordPress
24
  * Accept donation on your WordPress site for a cause.
25
  * Allow your users to specify an amount that they wish to pay. Useful when you need to accept variable payment amount.
26
  * Ability to specify a reference value for the payment.
 
27
  * Add PayPal Buy Now buttons anywhere on a WordPress post or a page.
28
  * Ability to set the country code to use a particular language for the PayPal checkout page.
29
  * Create a payment button widget to accept payment in any currency accepted by PayPal.
 
30
 
31
  == Usage ==
32
 
@@ -52,6 +54,11 @@ Visit the plugin site at http://www.tipsandtricks-hq.com/?p=120 for screenshots.
52
 
53
  == Changelog ==
54
 
 
 
 
 
 
55
  = 3.2 =
56
  Added an option in the shortcode to set the country code to be used for the PayPal checkout page language.
57
 
1
  === WP Easy Paypal Payment Accept ===
2
  Contributors: Ruhul Amin, Tips and Tricks HQ
3
  Donate link: http://www.tipsandtricks-hq.com
4
+ Tags: Paypal payment, Accept payment for services or product, PayPal donation, wordpress paypal, paypal for wordpress, paypal plugin for wordpress, paypal integration, paypal, buy now
5
  Requires at least: 3.0
6
+ Tested up to: 3.7
7
+ Stable tag: 3.3
8
  License: GPLv2 or later
9
 
10
  Easy to use Wordpress plugin to accept paypal payment for a service or product or donation in one click
13
 
14
  Easy to use Wordpress plugin to accept paypal payment for a service or product or donation in one click. Can be used in the sidebar, posts and pages of your site.
15
 
16
+ For information, detailed documentation, video tutorial and updates, please visit the [WordPress PayPal Payment](http://www.tipsandtricks-hq.com/?p=120) Plugin Page
17
 
18
  * Quick installation and setup.
19
  * Easily take payment for a service from your site via PayPal.
24
  * Accept donation on your WordPress site for a cause.
25
  * Allow your users to specify an amount that they wish to pay. Useful when you need to accept variable payment amount.
26
  * Ability to specify a reference value for the payment.
27
+ * Ability to specify a payment subject for the payment widget.
28
  * Add PayPal Buy Now buttons anywhere on a WordPress post or a page.
29
  * Ability to set the country code to use a particular language for the PayPal checkout page.
30
  * Create a payment button widget to accept payment in any currency accepted by PayPal.
31
+ * Ability to specify a payment subject for each paypal payment widget.
32
 
33
  == Usage ==
34
 
54
 
55
  == Changelog ==
56
 
57
+ = 3.3 =
58
+ - Added an option in the shortcode to specify a payment subject. This can be handy if you have multiple payment widgets on your site.
59
+ - WordPress 3.7 compatibility
60
+ - Fixed some deprecated calls
61
+
62
  = 3.2 =
63
  Added an option in the shortcode to set the country code to be used for the PayPal checkout page language.
64
 
shortcode_view.php CHANGED
@@ -10,6 +10,7 @@ function wppp_render_paypal_button_form($args)
10
  'reference' => 'Your Email Address',
11
  'other_amount' => '',
12
  'country_code' => '',
 
13
  ), $args));
14
 
15
  $options = explode( '|' , $options);
@@ -42,9 +43,18 @@ function wppp_render_paypal_button_form($args)
42
 
43
  <div class="wp_pp_button_reference_section">
44
  <label for="wp_pp_button_reference"><?php echo $reference; ?></label>
45
- <br /><input type="text" name="os0" class="wp_pp_button_reference" />
 
 
46
  </div>
47
 
 
 
 
 
 
 
 
48
  <input type="hidden" name="cmd" value="_xclick">
49
  <input type="hidden" name="business" value="<?php echo $email; ?>">
50
  <input type="hidden" name="currency_code" value="<?php echo $currency; ?>">
@@ -70,6 +80,9 @@ margin-bottom: 10px;
70
  .wp_paypal_button_widget{
71
  margin: 10px 0;
72
  }
 
 
 
73
  </style>
74
  <script type="text/javascript">
75
  jQuery(document).ready(function($) {
10
  'reference' => 'Your Email Address',
11
  'other_amount' => '',
12
  'country_code' => '',
13
+ 'payment_subject' => '',
14
  ), $args));
15
 
16
  $options = explode( '|' , $options);
43
 
44
  <div class="wp_pp_button_reference_section">
45
  <label for="wp_pp_button_reference"><?php echo $reference; ?></label>
46
+ <br />
47
+ <input type="hidden" name="on0" value="Reference" />
48
+ <input type="text" name="os0" value="" class="wp_pp_button_reference" />
49
  </div>
50
 
51
+ <?php
52
+ if(!empty($payment_subject)){
53
+ ?>
54
+ <input type="hidden" name="on1" value="Payment Subject" />
55
+ <input type="hidden" name="os1" value="<?php echo $payment_subject; ?>" />
56
+ <?php } ?>
57
+
58
  <input type="hidden" name="cmd" value="_xclick">
59
  <input type="hidden" name="business" value="<?php echo $email; ?>">
60
  <input type="hidden" name="currency_code" value="<?php echo $currency; ?>">
80
  .wp_paypal_button_widget{
81
  margin: 10px 0;
82
  }
83
+ .wp_accept_pp_button_form input{
84
+ width: auto !important;
85
+ }
86
  </style>
87
  <script type="text/javascript">
88
  jQuery(document).ready(function($) {