Changeset 2851789
- Timestamp:
- 01/20/2023 10:47:50 AM (3 years ago)
- Location:
- chaiport-payment/trunk
- Files:
-
- 2 edited
-
chaiportGateway.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
chaiport-payment/trunk/chaiportGateway.php
r2823329 r2851789 4 4 * Plugin URI: https://www.docs.chaiport.io/plugins_and_sdks/woocommerce-plugin.html 5 5 * Description: Single Payment 6 * Version: 1.0. 66 * Version: 1.0.7 7 7 * Requires at least: 5.6 8 8 * Author: Chai Finance … … 731 731 } 732 732 733 $isItemsAvailable = true; 734 foreach ($itemsArray as $item) { 735 if ($item["price"] == 0) { 736 $isItemsAvailable = false; 737 break; 738 } 739 } 740 733 741 $custom_logo_id = get_theme_mod('custom_logo'); 734 742 $image = wp_get_attachment_image_src($custom_logo_id, 'full'); … … 770 778 $billingShippingArray = $this->getBillingShippingInfo($order); 771 779 772 $reqObj = array( 773 "chaipay_key" => "$publicKey", 774 "merchant_details" => $merchantObj, 775 "merchant_order_id" => "$merchantOrder", 776 "signature_hash" => "$signature", 777 "amount" => (float)$amount, 778 "currency" => "$currencyCode", 779 "description" => "Your order-id is: $merchantOrder", 780 "order_details" => $itemsArray, 781 "billing_details" => $billingShippingArray[0], 782 "shipping_details" => $billingShippingArray[1], 783 "success_url" => "$red", 784 "failure_url" => "$red", 785 "country_code" => $countryCode, 786 "expiry_hours" => 96, 787 "is_checkout_embed" => false, 788 "show_shipping_details" => $this->getOptionBool('show_shipping_details'), 789 "show_back_button" => $this->getOptionBool('show_back_button'), 790 "default_guest_checkout" => $this->getOptionBool('default_guest_checkout'), 791 "environment" => $environment 792 ); 780 if ($isItemsAvailable) { 781 $reqObj = array( 782 "chaipay_key" => "$publicKey", 783 "merchant_details" => $merchantObj, 784 "merchant_order_id" => "$merchantOrder", 785 "signature_hash" => "$signature", 786 "amount" => (float)$amount, 787 "currency" => "$currencyCode", 788 "description" => "Your order-id is: $merchantOrder", 789 "order_details" => $itemsArray, 790 "billing_details" => $billingShippingArray[0], 791 "shipping_details" => $billingShippingArray[1], 792 "success_url" => "$red", 793 "failure_url" => "$red", 794 "country_code" => $countryCode, 795 "expiry_hours" => 96, 796 "is_checkout_embed" => false, 797 "show_shipping_details" => $this->getOptionBool('show_shipping_details'), 798 "show_back_button" => $this->getOptionBool('show_back_button'), 799 "default_guest_checkout" => $this->getOptionBool('default_guest_checkout'), 800 "environment" => $environment, 801 "source" => "woocommerce" 802 ); 803 } else { 804 $reqObj = array( 805 "chaipay_key" => "$publicKey", 806 "merchant_details" => $merchantObj, 807 "merchant_order_id" => "$merchantOrder", 808 "signature_hash" => "$signature", 809 "amount" => (float)$amount, 810 "currency" => "$currencyCode", 811 "description" => "Your order-id is: $merchantOrder", 812 "billing_details" => $billingShippingArray[0], 813 "shipping_details" => $billingShippingArray[1], 814 "success_url" => "$red", 815 "failure_url" => "$red", 816 "country_code" => $countryCode, 817 "expiry_hours" => 96, 818 "is_checkout_embed" => false, 819 "show_shipping_details" => $this->getOptionBool('show_shipping_details'), 820 "show_back_button" => $this->getOptionBool('show_back_button'), 821 "default_guest_checkout" => $this->getOptionBool('default_guest_checkout'), 822 "environment" => $environment, 823 "source" => "woocommerce" 824 ); 825 } 793 826 794 827 $token = $this->ChaiportGenerateJwtToken($publicKey, $secretKey); -
chaiport-payment/trunk/readme.txt
r2823329 r2851789 4 4 Requires at least: 3.9.2 5 5 Tested up to: 6.1.1 6 Stable tag: 1.0. 66 Stable tag: 1.0.7 7 7 Requires PHP: 5.6 8 8 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.