WP Easy Paypal Payment Accept - Version 2.8

Version Description

Download this release

Release Info

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

Code changes from version 2.2.1 to 2.8

Files changed (3) hide show
  1. WP_Accept_Paypal_Payment.php +127 -30
  2. readme.txt +32 -21
  3. shortcode_view.php +43 -0
WP_Accept_Paypal_Payment.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /*
3
  Plugin Name: WP Easy Paypal Payment Accept
4
- Version: v2.2.1
5
  Plugin URI: http://www.tipsandtricks-hq.com/?p=120
6
- Author: Ruhul Amin
7
- Author URI: http://www.antique-hq.com/
8
- Plugin Description: 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.
9
  */
10
 
11
  /*
@@ -19,8 +19,7 @@ Plugin Description: Easy to use Wordpress plugin to accept paypal payment for a
19
  GNU General Public License for more details.
20
  */
21
 
22
-
23
- $wp_paypal_payment_version = 2.2;
24
 
25
  // Some default options
26
  add_option('wp_pp_payment_email', 'korin.iverson@gmail.com');
@@ -34,6 +33,37 @@ add_option('wp_pp_payment_item3', 'Platinum Service - $30');
34
  add_option('wp_pp_payment_value3', '30');
35
  add_option('wp_paypal_widget_title_name', 'Paypal Payment');
36
  add_option('payment_button_type', 'https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  function Paypal_payment_accept()
39
  {
@@ -54,8 +84,13 @@ function Paypal_payment_accept()
54
  $itemName6 = get_option('wp_pp_payment_item6');
55
  $value6 = get_option('wp_pp_payment_value6');
56
  $payment_button = get_option('payment_button_type');
 
 
 
 
57
 
58
  /* === Paypal form === */
 
59
  $output .= '
60
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
61
  <input type="hidden" name="cmd" value="_xclick" />
@@ -88,18 +123,41 @@ function Paypal_payment_accept()
88
  }
89
 
90
  $output .= '</select>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  $output .= '
92
- <br /><br />
93
- <input type="hidden" name="on0" value="Your Email Address" /><strong>Your Email Address:</strong>
94
- <br /><br />
95
- <input type="text" name="os0" maxlength="60" />
96
  <br /><br />
97
- <input type="hidden" name="no_shipping" value="2" />
98
  <input type="hidden" name="no_note" value="1" />
 
99
  <input type="hidden" name="bn" value="IC_Sample" />
100
  ';
 
 
 
 
 
 
 
 
 
101
  $output .= "<input type=\"image\" src=\"$payment_button\" name=\"submit\" alt=\"Make payments with payPal - it's fast, free and secure!\" />";
102
  $output .= '</form>';
 
103
  /* = end of paypal form = */
104
  return $output;
105
  }
@@ -135,18 +193,23 @@ function paypal_payment_options_page() {
135
  update_option('paypal_payment_currency', (string)$_POST["paypal_payment_currency"]);
136
  update_option('wp_pp_payment_subject', (string)$_POST["wp_pp_payment_subject"]);
137
  update_option('wp_pp_payment_item1', (string)$_POST["wp_pp_payment_item1"]);
138
- update_option('wp_pp_payment_value1', (int)$_POST["wp_pp_payment_value1"]);
139
  update_option('wp_pp_payment_item2', (string)$_POST["wp_pp_payment_item2"]);
140
- update_option('wp_pp_payment_value2', (int)$_POST["wp_pp_payment_value2"]);
141
  update_option('wp_pp_payment_item3', (string)$_POST["wp_pp_payment_item3"]);
142
- update_option('wp_pp_payment_value3', (int)$_POST["wp_pp_payment_value3"]);
143
  update_option('wp_pp_payment_item4', (string)$_POST["wp_pp_payment_item4"]);
144
- update_option('wp_pp_payment_value4', (int)$_POST["wp_pp_payment_value4"]);
145
  update_option('wp_pp_payment_item5', (string)$_POST["wp_pp_payment_item5"]);
146
- update_option('wp_pp_payment_value5', (int)$_POST["wp_pp_payment_value5"]);
147
  update_option('wp_pp_payment_item6', (string)$_POST["wp_pp_payment_item6"]);
148
- update_option('wp_pp_payment_value6', (int)$_POST["wp_pp_payment_value6"]);
149
  update_option('payment_button_type', (string)$_POST["payment_button_type"]);
 
 
 
 
 
150
  echo 'Options Updated!';
151
  echo '</strong></p></div>';
152
  }
@@ -160,8 +223,9 @@ function paypal_payment_options_page() {
160
 
161
  <h2>Accept Paypal Payment Settings v <?php echo $wp_paypal_payment_version; ?></h2>
162
 
163
- <p>For information and updates, please visit:<br />
164
- <a href="http://www.tipsandtricks-hq.com/?p=120">http://www.tipsandtricks-hq.com/</a></p>
 
165
 
166
  <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
167
  <input type="hidden" name="info_update" id="info_update" value="true" />
@@ -169,11 +233,13 @@ function paypal_payment_options_page() {
169
  <fieldset class="options">
170
  <legend>Usage:</legend>
171
 
172
- <p>There are three ways you can use this plugin:</p>
173
  <ol>
174
- <li>1. Add the trigger text <strong>&lt;!-- wp_paypal_payment --&gt;</strong> to a post or page</li>
175
- <li>2. Call the function from a template file: <strong>&lt;?php echo Paypal_payment_accept(); ?&gt;</strong></li>
176
- <li>3. Use the <strong>WP Paypal Payment</strong> Widget from the Widgets menu</li>
 
 
177
  </ol>
178
 
179
  </fieldset>
@@ -270,7 +336,30 @@ function paypal_payment_options_page() {
270
  <input name="wp_pp_payment_value6" type="text" size="10" value="<?php echo get_option('wp_pp_payment_value6'); ?>"/>
271
  <br /><i>Enter the name of the service or product and the price. eg. Enter "Basic service - $10" in the Payment Option text box and "10.00" in the price text box to accept a payment of $10 for "Basic service". Leave the Payment Option and Price fields empty if u don't want to use that option. For example, if you have 3 price options then fill in the top 3 and leave the rest empty.</i>
272
  </td></tr>
273
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  </table>
275
 
276
  <br /><br />
@@ -294,6 +383,11 @@ function paypal_payment_options_page() {
294
  <td><img border="0" src="https://www.paypal.com/en_US/i/btn/x-click-but11.gif" alt="" /></td>
295
  </tr>
296
  </table>
 
 
 
 
 
297
 
298
  </fieldset>
299
 
@@ -305,13 +399,15 @@ function paypal_payment_options_page() {
305
  </div><?php
306
  }
307
 
308
- function show_wp_paypal_payment_widget()
309
  {
 
 
310
  $wp_paypal_payment_widget_title_name_value = get_option('wp_paypal_widget_title_name');
311
- echo '<h2>';
312
- echo $wp_paypal_payment_widget_title_name_value;
313
- echo '</h2><br />';
314
  echo Paypal_payment_accept();
 
315
  }
316
 
317
  function wp_paypal_payment_widget_control()
@@ -331,10 +427,11 @@ function widget_wp_paypal_payment_init()
331
  }
332
 
333
  add_filter('the_content', 'wp_ppp_process');
 
 
 
334
 
335
  add_action('init', 'widget_wp_paypal_payment_init');
336
 
337
  // Insert the paypal_payment_add_option_pages in the 'admin_menu'
338
  add_action('admin_menu', 'paypal_payment_add_option_pages');
339
-
340
- ?>
1
  <?php
2
  /*
3
  Plugin Name: WP Easy Paypal Payment Accept
4
+ Version: v2.8
5
  Plugin URI: http://www.tipsandtricks-hq.com/?p=120
6
+ Author: Tips and Tricks HQ
7
+ Author URI: http://www.tipsandtricks-hq.com/
8
+ Description: 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.
9
  */
10
 
11
  /*
19
  GNU General Public License for more details.
20
  */
21
 
22
+ $wp_paypal_payment_version = 2.8;
 
23
 
24
  // Some default options
25
  add_option('wp_pp_payment_email', 'korin.iverson@gmail.com');
33
  add_option('wp_pp_payment_value3', '30');
34
  add_option('wp_paypal_widget_title_name', 'Paypal Payment');
35
  add_option('payment_button_type', 'https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif');
36
+ add_option('wp_pp_show_other_amount', '-1');
37
+ add_option('wp_pp_show_ref_box', '1');
38
+ add_option('wp_pp_ref_title', 'Your Email Address');
39
+ add_option('wp_pp_return_url', get_bloginfo('home'));
40
+
41
+ add_shortcode('wp_paypal_payment_box', 'wpapp_buy_now_button_shortcode' );
42
+ function wpapp_buy_now_button_shortcode( $atts, $content ) {
43
+ extract( shortcode_atts( array(
44
+ 'email' => 'your@paypal-email.com',
45
+ 'currency' => 'USD',
46
+ 'options' => 'Payment for Service 1:15.50|Payment for Service 2:30.00|Payment for Service 3:47.00',
47
+ 'return' => site_url(),
48
+ 'reference' => 'Your Email Address'
49
+ ) , $atts) );
50
+ $options = explode( '|' , $options);
51
+ $html_options = '';
52
+ foreach( $options as $option ) {
53
+ $option = explode( ':' , $option );
54
+ $name = esc_attr( $option[0] );
55
+ $price = esc_attr( $option[1] );
56
+ $html_options .= "<option data-product_name='{$name}' value='{$price}'>{$name} - {$price}</option>";
57
+
58
+ }
59
+ $payment_button_img_src = get_option('payment_button_type');
60
+ include_once ('shortcode_view.php');
61
+ }
62
+
63
+ add_action( 'init', 'wpapp_shortcode_plugin_enqueue_jquery' );
64
+ function wpapp_shortcode_plugin_enqueue_jquery() {
65
+ wp_enqueue_script('jquery');
66
+ }
67
 
68
  function Paypal_payment_accept()
69
  {
84
  $itemName6 = get_option('wp_pp_payment_item6');
85
  $value6 = get_option('wp_pp_payment_value6');
86
  $payment_button = get_option('payment_button_type');
87
+ $wp_pp_show_other_amount = get_option('wp_pp_show_other_amount');
88
+ $wp_pp_show_ref_box = get_option('wp_pp_show_ref_box');
89
+ $wp_pp_ref_title = get_option('wp_pp_ref_title');
90
+ $wp_pp_return_url = get_option('wp_pp_return_url');
91
 
92
  /* === Paypal form === */
93
+ $output .= '<div id="accept_paypal_payment_form">';
94
  $output .= '
95
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
96
  <input type="hidden" name="cmd" value="_xclick" />
123
  }
124
 
125
  $output .= '</select>';
126
+
127
+ // Show other amount text box
128
+ if ($wp_pp_show_other_amount == '1')
129
+ {
130
+ $output .= '<br /><br /><strong>Other Amount:</strong>';
131
+ $output .= '<br /><br /><input type="text" name="amount" size="10" title="Other donate" value="" />';
132
+ }
133
+
134
+ // Show the reference text box
135
+ if ($wp_pp_show_ref_box == '1')
136
+ {
137
+ $output .= "<br /><br /><strong> $wp_pp_ref_title :</strong>";
138
+ $output .= '<input type="hidden" name="on0" value="Reference" />';
139
+ $output .= '<br /><br /><input type="text" name="os0" maxlength="60" />';
140
+ }
141
+
142
  $output .= '
 
 
 
 
143
  <br /><br />
144
+ <input type="hidden" name="no_shipping" value="0" />
145
  <input type="hidden" name="no_note" value="1" />
146
+ <input type="hidden" name="mrb" value="3FWGC6LFTMTUG" />
147
  <input type="hidden" name="bn" value="IC_Sample" />
148
  ';
149
+ if (!empty($wp_pp_return_url))
150
+ {
151
+ $output .= '<input type="hidden" name="return" value="'.$wp_pp_return_url.'" />';
152
+ }
153
+ else
154
+ {
155
+ $output .='<input type="hidden" name="return" value="'. get_bloginfo('home') .'" />';
156
+ }
157
+
158
  $output .= "<input type=\"image\" src=\"$payment_button\" name=\"submit\" alt=\"Make payments with payPal - it's fast, free and secure!\" />";
159
  $output .= '</form>';
160
+ $output .= '</div>';
161
  /* = end of paypal form = */
162
  return $output;
163
  }
193
  update_option('paypal_payment_currency', (string)$_POST["paypal_payment_currency"]);
194
  update_option('wp_pp_payment_subject', (string)$_POST["wp_pp_payment_subject"]);
195
  update_option('wp_pp_payment_item1', (string)$_POST["wp_pp_payment_item1"]);
196
+ update_option('wp_pp_payment_value1', (double)$_POST["wp_pp_payment_value1"]);
197
  update_option('wp_pp_payment_item2', (string)$_POST["wp_pp_payment_item2"]);
198
+ update_option('wp_pp_payment_value2', (double)$_POST["wp_pp_payment_value2"]);
199
  update_option('wp_pp_payment_item3', (string)$_POST["wp_pp_payment_item3"]);
200
+ update_option('wp_pp_payment_value3', (double)$_POST["wp_pp_payment_value3"]);
201
  update_option('wp_pp_payment_item4', (string)$_POST["wp_pp_payment_item4"]);
202
+ update_option('wp_pp_payment_value4', (double)$_POST["wp_pp_payment_value4"]);
203
  update_option('wp_pp_payment_item5', (string)$_POST["wp_pp_payment_item5"]);
204
+ update_option('wp_pp_payment_value5', (double)$_POST["wp_pp_payment_value5"]);
205
  update_option('wp_pp_payment_item6', (string)$_POST["wp_pp_payment_item6"]);
206
+ update_option('wp_pp_payment_value6', (double)$_POST["wp_pp_payment_value6"]);
207
  update_option('payment_button_type', (string)$_POST["payment_button_type"]);
208
+ update_option('wp_pp_show_other_amount', ($_POST['wp_pp_show_other_amount']=='1') ? '1':'-1' );
209
+ update_option('wp_pp_show_ref_box', ($_POST['wp_pp_show_ref_box']=='1') ? '1':'-1' );
210
+ update_option('wp_pp_ref_title', (string)$_POST["wp_pp_ref_title"]);
211
+ update_option('wp_pp_return_url', (string)$_POST["wp_pp_return_url"]);
212
+
213
  echo 'Options Updated!';
214
  echo '</strong></p></div>';
215
  }
223
 
224
  <h2>Accept Paypal Payment Settings v <?php echo $wp_paypal_payment_version; ?></h2>
225
 
226
+ <p>For information and updates, please visit the plugin page at the following URL:<br />
227
+ <a href="http://www.tipsandtricks-hq.com/?p=120">http://www.tipsandtricks-hq.com/wordpress-easy-paypal-payment-or-donation-accept-plugin-120</a>
228
+ </p>
229
 
230
  <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
231
  <input type="hidden" name="info_update" id="info_update" value="true" />
233
  <fieldset class="options">
234
  <legend>Usage:</legend>
235
 
236
+ <p>There are a few ways you can use this plugin:</p>
237
  <ol>
238
+ <li>Add the shortcode <strong>[wp_paypal_payment]</strong> to a post or page</li>
239
+ <li>Call the function from a template file: <strong>&lt;?php echo Paypal_payment_accept(); ?&gt;</strong></li>
240
+ <li>Use the <strong>WP Paypal Payment</strong> Widget from the Widgets menu</li>
241
+ <li>Use the shortcode with custom parameter option to add multiple different payment widget in different areas of the site.
242
+ <a href="http://www.tipsandtricks-hq.com/wordpress-easy-paypal-payment-or-donation-accept-plugin-120#shortcode_with_custom_parameters" target="_blank">View documentation</a></li>
243
  </ol>
244
 
245
  </fieldset>
336
  <input name="wp_pp_payment_value6" type="text" size="10" value="<?php echo get_option('wp_pp_payment_value6'); ?>"/>
337
  <br /><i>Enter the name of the service or product and the price. eg. Enter "Basic service - $10" in the Payment Option text box and "10.00" in the price text box to accept a payment of $10 for "Basic service". Leave the Payment Option and Price fields empty if u don't want to use that option. For example, if you have 3 price options then fill in the top 3 and leave the rest empty.</i>
338
  </td></tr>
339
+
340
+ <br /><br />
341
+ <tr valign="top"><td width="25%" align="right">
342
+ <strong>Show Other Amount :</strong>
343
+ </td><td align="left">
344
+ <input name="wp_pp_show_other_amount" type="checkbox"<?php if(get_option('wp_pp_show_other_amount')!='-1') echo ' checked="checked"'; ?> value="1"/>
345
+ <i> Tick this checkbox if you want to show ohter amount text box to your visitors so they can enter custom amount.</i>
346
+ </td></tr>
347
+
348
+ <br />
349
+ <tr valign="top"><td width="25%" align="right">
350
+ <strong>Show Reference Text Box :</strong>
351
+ </td><td align="left">
352
+ <input name="wp_pp_show_ref_box" type="checkbox"<?php if(get_option('wp_pp_show_ref_box')!='-1') echo ' checked="checked"'; ?> value="1"/>
353
+ <i> Tick this checkbox if you want your visitors to be able to enter a reference text like email or web address.</i>
354
+ </td></tr>
355
+
356
+ <tr valign="top"><td width="25%" align="right">
357
+ <strong>Reference Text Box Title :</strong>
358
+ </td><td align="left">
359
+ <input name="wp_pp_ref_title" type="text" size="35" value="<?php echo get_option('wp_pp_ref_title'); ?>"/>
360
+ <br /><i>Enter a title for the Reference text box (ie. Your Web Address). The visitors will see this text</i><br />
361
+ </td></tr>
362
+
363
  </table>
364
 
365
  <br /><br />
383
  <td><img border="0" src="https://www.paypal.com/en_US/i/btn/x-click-but11.gif" alt="" /></td>
384
  </tr>
385
  </table>
386
+
387
+ <br />
388
+ <strong>Return URL from PayPal :</strong>
389
+ <input name="wp_pp_return_url" type="text" size="60" value="<?php echo get_option('wp_pp_return_url'); ?>"/>
390
+ <br /><i>Enter a return URL (could be a Thank You page). PayPal will redirect visitors to this page after Payment</i><br />
391
 
392
  </fieldset>
393
 
399
  </div><?php
400
  }
401
 
402
+ function show_wp_paypal_payment_widget($args)
403
  {
404
+ extract($args);
405
+
406
  $wp_paypal_payment_widget_title_name_value = get_option('wp_paypal_widget_title_name');
407
+ echo $before_widget;
408
+ echo $before_title . $wp_paypal_payment_widget_title_name_value . $after_title;
 
409
  echo Paypal_payment_accept();
410
+ echo $after_widget;
411
  }
412
 
413
  function wp_paypal_payment_widget_control()
427
  }
428
 
429
  add_filter('the_content', 'wp_ppp_process');
430
+ add_shortcode('wp_paypal_payment', 'Paypal_payment_accept');
431
+ if (!is_admin())
432
+ {add_filter('widget_text', 'do_shortcode');}
433
 
434
  add_action('init', 'widget_wp_paypal_payment_init');
435
 
436
  // Insert the paypal_payment_add_option_pages in the 'admin_menu'
437
  add_action('admin_menu', 'paypal_payment_add_option_pages');
 
 
readme.txt CHANGED
@@ -1,40 +1,51 @@
1
  === WP Easy Paypal Payment Accept ===
2
- Contributors: Ruhul Amin
3
- Donate link: http://www.tipsandtricks-hq.com/
4
- Tags: Paypal payment, shop, donation, plugin
5
- Requires at least: 2.0.2
6
- Tested up to: 2.7
7
- Stable tag: 2.2.1
 
8
 
9
- Easy to use Wordpress plugin to accept paypal payment for a service or product or donation in one click.
10
 
11
  == Description ==
12
- Easy to use Wordpress plugin to accept paypal payment for a service or product or donation in multiple currencies in one click. Can be used in the sidebar, posts and pages.
13
 
14
- For screenshots, more information and updates, please visit:
15
- http://www.tipsandtricks-hq.com/?page_id=120
16
 
17
- Usage:
18
- There are three ways you can use this plugin:
19
 
20
- 1. Add the trigger text <!-- wp_paypal_payment --> to a post or page
21
- 2. Call the function from a template file: <?php echo Paypal_payment_accept(); ?>
22
- 3. Use the widget from the Widgets section
 
 
 
 
23
 
 
 
 
 
 
 
 
 
24
 
25
  == Installation ==
26
 
27
  1. Unzip and Upload the folder 'WP-accept-paypal-payment' to the '/wp-content/plugins/' directory
28
  2. Activate the plugin through the 'Plugins' menu in WordPress
29
  3. Go to Settings and configure the options eg. your email, Subject text etc.
30
- 4. Use the Widget or add the trigger text <!-- wp_paypal_payment --> to a post or page where u want it to appear.
31
 
32
  == Frequently Asked Questions ==
33
- 1. Does this plugin have shopping cart? No.
34
- 2. Can this plugin be used to accept Donation? Yes
35
- 3. Can this plugin be used to accept paypal payment for a service or a product? Yes
36
 
37
  == Screenshots ==
38
- Visit the plugin site at for screenshots http://www.tipsandtricks-hq.com/?p=120.
39
- Check out this Plugin in action at http://www.antique-hq.com/written-appraisal
40
 
 
 
 
 
 
 
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
5
+ Requires at least: 3.0
6
+ Tested up to: 3.4.2
7
+ Stable tag: 2.8
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
11
 
12
  == Description ==
 
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.
20
+ * Add multiple payment widget for different services or products.
21
+ * Ability to configure which currency you want to use to accept the payment.
22
+ * You will need to have your own PayPal account (creating a PayPal account is free).
23
+ * Integrate PayPal with your WordPress powered site.
24
+ * Accept donation on your WordPress site for a cause.
25
 
26
+ == Usage ==
27
+
28
+ There are few ways you can use this plugin:
29
+
30
+ 1. Use the sortcode [wp_paypal_payment] to place the payment accept form.
31
+ 2. Add the paypal payment widget to your sidebar widgets.
32
+ 3. Call the function from a template file: <?php echo Paypal_payment_accept(); ?>
33
+ 4. Use the shortcode with custom parameter option to add multiple different payment widget in different areas of the site.
34
 
35
  == Installation ==
36
 
37
  1. Unzip and Upload the folder 'WP-accept-paypal-payment' to the '/wp-content/plugins/' directory
38
  2. Activate the plugin through the 'Plugins' menu in WordPress
39
  3. Go to Settings and configure the options eg. your email, Subject text etc.
40
+ 4. See the usage section for details on how to place the paypal payment widget
41
 
42
  == Frequently Asked Questions ==
 
 
 
43
 
44
  == Screenshots ==
 
 
45
 
46
+ Visit the plugin site at http://www.tipsandtricks-hq.com/?p=120 for screenshots.
47
+
48
+ == Changelog ==
49
+
50
+ Changelog can be found at the following URL
51
+ http://www.tipsandtricks-hq.com/?p=120
shortcode_view.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="wp_paypal_button_cont">
2
+
3
+ <select id="wp_paypal_button_options">
4
+ <?php echo $html_options; ?>
5
+ </select>
6
+
7
+ <br />
8
+
9
+ <label for="customer_email_address"><?php echo $reference; ?></label> <br />
10
+ <p><input type="text" id="customer_email_address" /></p>
11
+
12
+ <form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
13
+ <input type="hidden" name="cmd" value="_xclick">
14
+ <input type="hidden" name="business" value="<?php echo $email; ?>">
15
+ <input type="hidden" name="currency_code" value="<?php echo $currency; ?>">
16
+ <input type="hidden" name="item_name" value="">
17
+ <input type="hidden" name="amount" value="">
18
+ <input type="hidden" name="return" value="<?php echo $return; ?>" />
19
+ <input type="hidden" name="email" value="" />
20
+ </form>
21
+ <input type="image" id="buy_now_button" src="<?php echo $payment_button_img_src; ?>" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
22
+ </div>
23
+
24
+ <style>
25
+ #wp_paypal_button_options{
26
+ margin-bottom: 15px;
27
+ }
28
+ </style>
29
+
30
+ <script type="text/javascript">
31
+ jQuery('#wp_paypal_button_cont #buy_now_button').click(function(e){
32
+ e.preventDefault();
33
+ var price = jQuery('#wp_paypal_button_options').val();
34
+ var name = jQuery('#wp_paypal_button_options :selected').attr('data-product_name');
35
+ var email = jQuery('#customer_email_address').val();
36
+
37
+ jQuery('input[name=email]').val(email);
38
+ jQuery('input[name=amount]').val(price);
39
+ jQuery('input[name=item_name]').val(name);
40
+
41
+ jQuery('#wp_paypal_button_cont form').submit();
42
+ });
43
+ </script>