Changeset 2218484
- Timestamp:
- 12/27/2019 06:12:38 AM (6 years ago)
- Location:
- woo-paypal-addon/trunk
- Files:
-
- 2 edited
-
README.txt (modified) (1 diff)
-
woo-paypal-addon.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-paypal-addon/trunk/README.txt
r2218060 r2218484 101 101 * Fix - Remove depricated funcations. 102 102 * Update - Change Name 103 = 2.0.1 = 104 * Update - update Code security 103 105 == Upgrade Notice == 104 106 -
woo-paypal-addon/trunk/woo-paypal-addon.php
r2218060 r2218484 5 5 * Plugin URL: Addon for Paypal and WooCommerce 6 6 * Description: Addon for Paypal and WooCommerce allows you to accept payments on your Woocommerce store. It accpets credit card payments and processes them securely with your merchant account. 7 * Version: 2.0. 07 * Version: 2.0.1 8 8 * WC requires at least:2.3 9 9 * WC tested up to: 3.8.1 … … 18 18 */ 19 19 20 define('W OO_PAYMENT_DIR', plugin_dir_path(__FILE__));21 add_action('plugins_loaded', ' init_paypal_payment_gateway');20 define('WPPA_WOO_PAYMENT_DIR', plugin_dir_path(__FILE__)); 21 add_action('plugins_loaded', 'wppa_init_paypal_payment_gateway'); 22 22 23 23 use PayPal\Rest\ApiContext; … … 35 35 use PayPal\Api\Sale; 36 36 37 function init_paypal_payment_gateway()37 function wppa_init_paypal_payment_gateway() 38 38 { 39 add_filter('plugin_action_links_' . plugin_basename(__FILE__), ' add_paypal_addon_action_links');40 41 function add_paypal_addon_action_links($links)39 add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'wppa_add_paypal_addon_action_links'); 40 41 function wppa_add_paypal_addon_action_links($links) 42 42 { 43 43 $action_links = array( … … 47 47 } 48 48 49 class W C_Paypal_Gateway_EI extends WC_Payment_Gateway49 class WPPA_WC_Paypal_Gateway_EI extends WC_Payment_Gateway 50 50 { 51 51 /** … … 103 103 private function get_paypal_sdk() 104 104 { 105 require_once W OO_PAYMENT_DIR . 'includes/paypal-sdk/autoload.php';105 require_once WPPA_WOO_PAYMENT_DIR . 'includes/paypal-sdk/autoload.php'; 106 106 } 107 107 … … 227 227 if (isset($_GET['woopaypal'])) { 228 228 229 $woopaypal = $_GET['woopaypal'];230 $order_id = $_GET['order_id'];229 $woopaypal = sanitize_text_field( $_GET['woopaypal'] ); 230 $order_id = sanitize_text_field( $_GET['order_id'] ); 231 231 if ($order_id == 0 || $order_id == '') { 232 232 return; … … 240 240 if ($woopaypal == 'true') { 241 241 $this->get_api_context(); 242 $paymentId = $_GET['paymentId'];242 $paymentId = sanitize_text_field( $_GET['paymentId'] ); 243 243 $payment = Payment::get($paymentId, $this->apiContext); 244 244 … … 269 269 270 270 $execution = new PaymentExecution(); 271 $execution->setPayerId($_GET['PayerID']); 271 $payer_id = sanitize_text_field($_GET['PayerID']); 272 $execution->setPayerId($payer_id); 272 273 273 274 $execution->addTransaction($transaction); … … 341 342 * Add Gateway class to all payment gateway methods 342 343 */ 343 function add_paypal_gateway_class_ei($methods)344 function wppa_add_paypal_gateway_class_ei($methods) 344 345 { 345 $methods[] = 'W C_Paypal_Gateway_EI';346 $methods[] = 'WPPA_WC_Paypal_Gateway_EI'; 346 347 return $methods; 347 348 } 348 add_filter('woocommerce_payment_gateways', ' add_paypal_gateway_class_ei');349 350 add_action('init', ' check_for_woopaypal');351 function check_for_woopaypal()349 add_filter('woocommerce_payment_gateways', 'wppa_add_paypal_gateway_class_ei'); 350 351 add_action('init', 'wppa_check_for_woopaypal'); 352 function wppa_check_for_woopaypal() 352 353 { 353 354 if (isset($_GET['woopaypal'])) {
Note: See TracChangeset
for help on using the changeset viewer.