Changeset 3073097
- Timestamp:
- 04/18/2024 12:07:04 PM (2 years ago)
- Location:
- chaiport-payment/trunk
- Files:
-
- 4 added
- 2 edited
-
chaiportGateway.php (modified) (8 diffs)
-
images/woocommerce_icon.png (added)
-
includes (added)
-
includes/portoneBlocks.js (added)
-
includes/portoneBlocks.php (added)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
chaiport-payment/trunk/chaiportGateway.php
r3014526 r3073097 4 4 * Plugin URI: https://www.docs.portone.cloud/plugins_and_sdks/woocommerce-plugin.html 5 5 * Description: Single Payment 6 * Version: 2.0.96 * Version: 3.0.0 7 7 * Requires at least: 5.6 8 8 * Author: PortOne … … 474 474 { 475 475 476 add_action( 'before_woocommerce_init', 'portone_cart_checkout_blocks_compatibility' ); 477 add_action( 'woocommerce_blocks_loaded', 'portone_gateway_block_support' ); 478 476 479 class WC_Chaiport_Gateway extends WC_Payment_Gateway 477 480 { … … 486 489 487 490 $plugin_location = plugin_dir_url(__FILE__); 488 $imageUrl = $plugin_location . "images/ pay.png";491 $imageUrl = $plugin_location . "images/woocommerce_icon.png"; 489 492 490 493 $websiteUrl = get_bloginfo('url'); … … 572 575 'type' => 'text', 573 576 'description' => 'This is the title which the user sees during checkout.', 574 'default' => 'C redit Card/Debit Card/E-Wallets',577 'default' => 'Cards/Wallets/Bank-Transfer', 575 578 'desc_tip' => false 576 579 ), … … 579 582 'type' => 'textarea', 580 583 'description' => 'This is the description which the user sees during checkout.', 581 'default' => 'Pay with your Credit Card/Debit Card/E-Wallets via PortOne Payment Service'584 'default' => 'Pay with Cards/Wallets/Bank-Transfer via PortOne' 582 585 ), 583 586 'testmode' => array( … … 769 772 "back_url" => get_bloginfo('url') . "/checkout/", 770 773 "shipping_charges" => round((float)$order->get_shipping_total(), 2), 771 "promo_discount" => round((float)$discount_total, 2) 774 "promo_discount" => round((float)$discount_total, 2), 775 "tax_amount" => round((float)$order->get_total_tax(), 2) 772 776 ); 773 777 774 778 $this->console_log("Environment is: " . $environment, ''); 775 if ($amount != ((float)$order->get_ shipping_total() + $item_total - round((float)$discount_total, 2))) {779 if ($amount != ((float)$order->get_total_tax() + (float)$order->get_shipping_total() + $item_total - round((float)$discount_total, 2))) { 776 780 $this->console_log("Not sending item details", ''); 777 781 $isItemsAvailable = false; … … 786 790 $this->console_log("Total amount is: " . $amount, ''); 787 791 $this->console_log("Items total is: " . $item_total, ''); 792 $this->console_log("Tax amount is: " . round((float)$order->get_total_tax(), 2), ''); 788 793 $this->console_log("Shipping amount is: " . (float)$order->get_shipping_total(), ''); 789 794 $this->console_log("Discount is: " . round((float)$discount_total, 2), ''); … … 1253 1258 } 1254 1259 } 1260 1261 function portone_cart_checkout_blocks_compatibility() { 1262 1263 if( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { 1264 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 1265 'cart_checkout_blocks', 1266 __FILE__, 1267 true // true (compatible, default) or false (not compatible) 1268 ); 1269 } 1270 1271 } 1272 1273 1274 function portone_gateway_block_support() { 1275 1276 if( ! class_exists( 'Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType' ) ) { 1277 return; 1278 } 1279 1280 // here we're including our "gateway block support class" 1281 require_once plugin_dir_path( __FILE__ ) . 'includes/portoneBlocks.php'; 1282 1283 // registering the PHP class we have just included 1284 add_action( 1285 'woocommerce_blocks_payment_method_type_registration', 1286 function( Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry ) { 1287 $payment_method_registry->register( new WC_Portone_Gateway_Blocks_Support ); 1288 } 1289 ); 1290 1291 } -
chaiport-payment/trunk/readme.txt
r3014526 r3073097 3 3 Tags: chaipay, chaiport, payments, woocommerce, ecommerce, portone 4 4 Requires at least: 3.9.2 5 Tested up to: 6. 1.16 Stable tag: 2.0.95 Tested up to: 6.5.2 6 Stable tag: 3.0.0 7 7 Requires PHP: 5.6 8 8 License: GPLv2 or later … … 13 13 == Description == 14 14 15 This is the official PortOne payments plugin for WooCommerce. Allows you to accept credit cards, debit cards and wallet payments with the WooCommerce plugin. It uses a seamless integration, allowing the customer to pay on your website without being redirected away. This works across all browsers, and is compatible with the latest WooCommerce.15 This is the official PortOne payments plugin for WooCommerce. Allows you to accept credit cards, debit cards and wallet payments with the WooCommerce plugin. 16 16 17 This is compatible with WooCommerce>=2.4, including the new 3.0 release. It has been tested upto the 3.1.1 WooCommerce release. 17 It uses a seamless integration, allowing the customer to pay on your website without being redirected away. This works across all browsers, and is compatible with the latest WooCommerce. 18 19 This plugin supports both, legacy and the new Blocks based checkout. 20 21 This is compatible with WooCommerce>=2.4. It has been tested upto the 8.7.0 WooCommerce release. 18 22 19 23 == Installation ==
Note: See TracChangeset
for help on using the changeset viewer.