Plugin Directory

Changeset 2767573


Ignore:
Timestamp:
08/08/2022 06:37:27 AM (4 years ago)
Author:
patsatech
Message:

Added screenshots and edited trunk files.

Location:
patsatech-wc-opayo-server
Files:
8 added
2 edited

Legend:

Unmodified
Added
Removed
  • patsatech-wc-opayo-server/trunk/class-patsatech-wc-opayo-server.php

    r2575414 r2767573  
    44 * Plugin URI: http://www.patsatech.com/
    55 * Description: WooCommerce Plugin for accepting payment through Opayo Server Gateway.
    6  * Version: 1.0.1
     6 * Version: 1.0.2
    77 * Author: PatSaTECH
    88 * Author URI: http://www.patsatech.com
    99 * Contributors: patsatech
    1010 * Requires at least: 4.5
    11  * Tested up to: 5.8
     11 * Tested up to: 6.0.1
    1212 * WC requires at least: 3.0.0
    13  * WC tested up to: 5.5.2
     13 * WC tested up to: 6.2.1
    1414 *
    1515 * Text Domain: patsatech-wc-opayo-server
     
    237237            $time_stamp = gmdate( 'ymdHis' );
    238238            $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;
    239322
    240323            $sd_arg['ReferrerID']        = 'CC923B06-40D5-4713-85C1-700D690550BF';
  • patsatech-wc-opayo-server/trunk/readme.txt

    r2575414 r2767573  
    22Contributors: patsatech
    33Tags: ecommerce, payment gateway, wordpress, woocommerce,opayo server,opayo go
     4Donate link: https://buy.stripe.com/6oE7t9h1y0Ozak07su
    45Requires at least: 4.5
    5 Tested up to: 5.8
    6 Stable tag: 1.0.1
     6Tested up to: 6.0.1
     7Stable tag: 1.0.2
    78License: GPLv2 or later
    89
     
    1617
    1718So this plugin helps you to accept payments on your WooCommerce Store using Opayo Accounts.
     19
    1820Send us your ideas and feedback here: https://www.patsatech.com/contact-us
    1921
     
    22241. Download and unzip the latest release zip file.
    23252. 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.
     263. Upload the entire plugin directory to your "/wp-content/plugins/" directory.
     274. Activate the plugin through the "Plugins" menu in WordPress Administration.
     28
     29== Screenshots ==
     30
     311. Opayo WooCommerce Settings Page
     32
     332. Example Checkout Page displaying Opayo payment method.
     34
     353. Card Selection page on Opayo site.
     36
     374. Card Details entry page.
     38
     395. Page displaying cart and card details on opayo site.
     40
     416. Page displaying 3D Secure windows if the payment is challenged.
     42
     437. Payment being processed.
     44
     458. Order Received page displayed by WooCommerce.
    2646
    2747== Changelog ==
     
    3252= 1.0.1 =
    3353* 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 =
     60If you would like the plugin to send Cart Details to opayo Upgrade immediately.
Note: See TracChangeset for help on using the changeset viewer.