Changeset 2888142
- Timestamp:
- 03/28/2023 08:15:34 AM (3 years ago)
- Location:
- chaiport-payment/trunk
- Files:
-
- 3 edited
-
chaiportGateway.php (modified) (10 diffs)
-
images/pay.png (modified) (previous)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
chaiport-payment/trunk/chaiportGateway.php
r2884049 r2888142 4 4 * Plugin URI: https://www.docs.portone.cloud/plugins_and_sdks/woocommerce-plugin.html 5 5 * Description: Single Payment 6 * Version: 2.0. 46 * Version: 2.0.5 7 7 * Requires at least: 5.6 8 8 * Author: PortOne … … 101 101 $publicKey = $options["publishable_key"]; 102 102 $privateKey = $options["private_key"]; 103 $chaiPortId = $publicKey . "- MERCHANT-" . $orderId;103 $chaiPortId = $publicKey . "-" . $orderId; 104 104 $orderStatusType = $options["payment_process_action"]; 105 105 $getOrderStatusUrl = $chaiApiUrl . $chaiPortId; … … 560 560 'description' => 'This is the title which the user sees during checkout.', 561 561 'default' => 'Credit Card/Debit Card/E-Wallets', 562 'desc_tip' => false, 563 'custom_attributes' => array('readonly' => 'readonly') 562 'desc_tip' => false 564 563 ), 565 564 'description' => array( … … 567 566 'type' => 'textarea', 568 567 'description' => 'This is the description which the user sees during checkout.', 569 'default' => 'Pay with your Credit Card/Debit Card/E-Wallets via PortOne Payment Service', 570 'custom_attributes' => array('readonly' => 'readonly') 568 'default' => 'Pay with your Credit Card/Debit Card/E-Wallets via PortOne Payment Service' 571 569 ), 572 570 'testmode' => array( … … 692 690 $environment = $this->testmode ? "sandbox" : "live"; 693 691 694 $merchantOrder = $publicKey . "- MERCHANT-" . $order->get_id();692 $merchantOrder = $publicKey . "-" . $order->get_id(); 695 693 696 694 $order->add_order_note("PortOne OrderId: $merchantOrder"); … … 753 751 "logo" => $image[0], 754 752 "back_url" => get_bloginfo('url') . "/checkout/", 755 "shipping_charges" => (float)$order->get_shipping_total(),756 "promo_discount" => $discount_total753 "shipping_charges" => round((float)$order->get_shipping_total(), 2), 754 "promo_discount" => round((float)$discount_total, 2) 757 755 ); 758 756 759 757 $this->console_log("Environment is: " . $environment, ''); 760 if ($amount != ((float)$order->get_shipping_total() + $item_total - $discount_total)) {758 if ($amount != ((float)$order->get_shipping_total() + $item_total - round((float)$discount_total, 2))) { 761 759 $this->console_log("Not sending item details", ''); 762 760 $isItemsAvailable = false; … … 772 770 $this->console_log("Items total is: " . $item_total, ''); 773 771 $this->console_log("Shipping amount is: " . (float)$order->get_shipping_total(), ''); 774 $this->console_log("Discount is: " . $discount_total, '');772 $this->console_log("Discount is: " . round((float)$discount_total, 2), ''); 775 773 } 776 774 … … 811 809 "amount" => (float)$amount, 812 810 "currency" => "$currencyCode", 813 "description" => " Your order-id is: $merchantOrder",811 "description" => "Order Id: " . $order->get_id(), 814 812 "order_details" => $itemsArray, 815 813 "billing_details" => $billingShippingArray[0], … … 834 832 "amount" => (float)$amount, 835 833 "currency" => "$currencyCode", 836 "description" => " Your order-id is: $merchantOrder",834 "description" => "Order Id: " . $order->get_id(), 837 835 "billing_details" => $billingShippingArray[0], 838 836 "shipping_details" => $billingShippingArray[1], … … 902 900 global $woocommerce; 903 901 $order = wc_get_order($order_id); 904 $woocommerce->session->set(self::SESSION_KEY, get_bloginfo('name') . "- MERCHANT-" . $order_id);902 $woocommerce->session->set(self::SESSION_KEY, get_bloginfo('name') . "-" . $order_id); 905 903 $woocommerce->cart->empty_cart(); 906 904 -
chaiport-payment/trunk/readme.txt
r2884049 r2888142 4 4 Requires at least: 3.9.2 5 5 Tested up to: 6.1.1 6 Stable tag: 2.0. 46 Stable tag: 2.0.5 7 7 Requires PHP: 5.6 8 8 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.