Changeset 2767573
- Timestamp:
- 08/08/2022 06:37:27 AM (4 years ago)
- Location:
- patsatech-wc-opayo-server
- Files:
-
- 8 added
- 2 edited
-
assets/Screenshot-1.png (added)
-
assets/Screenshot-2.png (added)
-
assets/Screenshot-3.png (added)
-
assets/Screenshot-4.png (added)
-
assets/Screenshot-5.png (added)
-
assets/Screenshot-6.png (added)
-
assets/Screenshot-7.png (added)
-
assets/Screenshot-8.png (added)
-
trunk/class-patsatech-wc-opayo-server.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
patsatech-wc-opayo-server/trunk/class-patsatech-wc-opayo-server.php
r2575414 r2767573 4 4 * Plugin URI: http://www.patsatech.com/ 5 5 * Description: WooCommerce Plugin for accepting payment through Opayo Server Gateway. 6 * Version: 1.0. 16 * Version: 1.0.2 7 7 * Author: PatSaTECH 8 8 * Author URI: http://www.patsatech.com 9 9 * Contributors: patsatech 10 10 * Requires at least: 4.5 11 * Tested up to: 5.811 * Tested up to: 6.0.1 12 12 * WC requires at least: 3.0.0 13 * WC tested up to: 5.5.213 * WC tested up to: 6.2.1 14 14 * 15 15 * Text Domain: patsatech-wc-opayo-server … … 237 237 $time_stamp = gmdate( 'ymdHis' ); 238 238 $orderid = $this->vendor_name . '-' . $time_stamp . '-' . $order_id; 239 240 $basket = ''; 241 242 // Cart Contents 243 $item_loop = 0; 244 245 246 foreach ( $order->get_items() as $item_id => $item ) { 247 $item_loop++; 248 249 $product_id = $item->get_product_id(); 250 $variation_id = $item->get_variation_id(); 251 $product = $item->get_product(); // Product object gives you access to all product data 252 $product_name = $item->get_name(); 253 $quantity = $item->get_quantity(); 254 $subtotal = $item->get_subtotal(); 255 $total = $item->get_total(); 256 $tax_subtotal = $item->get_subtotal_tax(); 257 $tax_class = $item->get_tax_class(); 258 $tax_status = $item->get_tax_status(); 259 $all_meta_data = $item->get_meta_data(); 260 //$your_meta_data = $item->get_meta( '_your_meta_key', true ); 261 $product_type = $item->get_type(); 262 263 264 $item_cost = $item->get_subtotal()/$quantity; 265 $item_total_inc_tax = 0; 266 $item_total = $item->get_subtotal(); 267 //$item_sub_total = 268 269 $item_tax = 0; 270 if($item_loop > 1){ 271 $basket .= ':'; 272 } 273 274 $sku = $product ? $product->get_sku() : ''; 275 276 $basket .= str_replace(':',' = ',$sku).str_replace(':',' = ',$product_name).':'.$quantity.':'.$item_cost.':'.$item_tax.':'.number_format( $item_cost+$item_tax, 2, '.', '' ).':'.$item_total; 277 278 279 } 280 281 282 283 // Fees 284 if ( sizeof( $order->get_fees() ) > 0 ) { 285 foreach ( $order->get_fees() as $order_item ) { 286 $item_loop++; 287 288 $basket .= ':'.str_replace(':',' = ',$order_item['name']).':1:'.$order_item['line_total'].':---:'.$order_item['line_total'].':'.$order_item['line_total']; 289 } 290 } 291 292 // Shipping Cost item - paypal only allows shipping per item, we want to send shipping for the order 293 if ( $order->get_total_shipping() > 0 ) { 294 $item_loop++; 295 296 $ship_exc_tax = number_format( $order->get_total_shipping(), 2, '.', '' ); 297 298 $basket .= ':'.__( 'Shipping via', 'woo-acceptpay' ) . ' ' . str_replace(':',' = ',ucwords( $order->get_shipping_method() )).':1:'.$ship_exc_tax.':'.$order->get_shipping_tax().':'.number_format( $ship_exc_tax+$order->get_shipping_tax(), 2, '.', '' ).':'.number_format( $order->get_total_shipping()+$order->get_shipping_tax(), 2, '.', '' ); 299 } 300 301 // Discount 302 if ( $order->get_total_discount() > 0 ){ 303 $item_loop++; 304 305 $basket .= ':Discount:---:---:---:---:-'.$order->get_total_discount(); 306 } 307 308 // Tax 309 if ( $order->get_total_tax() > 0 ) { 310 $item_loop++; 311 312 $basket .= ':Tax:---:---:---:---:'.$order->get_total_tax(); 313 } 314 315 $item_loop++; 316 317 $basket .= ':Order Total:---:---:---:---:'.$order->get_total(); 318 319 $basket = $item_loop.':'.$basket; 320 321 $sd_arg['Basket'] = $basket; 239 322 240 323 $sd_arg['ReferrerID'] = 'CC923B06-40D5-4713-85C1-700D690550BF'; -
patsatech-wc-opayo-server/trunk/readme.txt
r2575414 r2767573 2 2 Contributors: patsatech 3 3 Tags: ecommerce, payment gateway, wordpress, woocommerce,opayo server,opayo go 4 Donate link: https://buy.stripe.com/6oE7t9h1y0Ozak07su 4 5 Requires at least: 4.5 5 Tested up to: 5.86 Stable tag: 1.0. 16 Tested up to: 6.0.1 7 Stable tag: 1.0.2 7 8 License: GPLv2 or later 8 9 … … 16 17 17 18 So this plugin helps you to accept payments on your WooCommerce Store using Opayo Accounts. 19 18 20 Send us your ideas and feedback here: https://www.patsatech.com/contact-us 19 21 … … 22 24 1. Download and unzip the latest release zip file. 23 25 2. If you use the WordPress plugin uploader to install this plugin skip to step 4. 24 3. Upload the entire plugin directory to your `/wp-content/plugins/` directory. 25 4. Activate the plugin through the 'Plugins' menu in WordPress Administration. 26 3. Upload the entire plugin directory to your "/wp-content/plugins/" directory. 27 4. Activate the plugin through the "Plugins" menu in WordPress Administration. 28 29 == Screenshots == 30 31 1. Opayo WooCommerce Settings Page 32 33 2. Example Checkout Page displaying Opayo payment method. 34 35 3. Card Selection page on Opayo site. 36 37 4. Card Details entry page. 38 39 5. Page displaying cart and card details on opayo site. 40 41 6. Page displaying 3D Secure windows if the payment is challenged. 42 43 7. Payment being processed. 44 45 8. Order Received page displayed by WooCommerce. 26 46 27 47 == Changelog == … … 32 52 = 1.0.1 = 33 53 * Edited to improve compatibilty with latest versions of WooCommerce. 54 55 = 1.0.2 = 56 * Updated to send the Cart Details to opayo. 57 58 == Upgrade Notice == 59 = 1.0.2 = 60 If you would like the plugin to send Cart Details to opayo Upgrade immediately.
Note: See TracChangeset
for help on using the changeset viewer.