id = 'nexapay'; $this->icon = apply_filters('woocommerce_nexapay_icon',plugins_url('/assets/icon.png',__FILE__)); $this->method_title = __('nexapay','wc_nexapay_payment'); $this->method_description = __('This plugin allows you to integrate with nexapay payments','wc_nexapay_payment'); $this->title = __( "nexapay", 'wc_nexapay_payment' ); $this->description = "nexapay Payment Setting page."; $this->has_fields = false; $this->init_form_fields(); $this->init_settings(); $this->title = $this->get_option('title'); $this->url = $this->settings['nexapay_url']; $this->key_id = $this->settings['key_id']; $this->secret_key = $this->settings['secret_key']; $this->description = $this->settings['description']; $this->prod_id = $this->settings['prod_id']; $this->request_hashkey = $this->settings['request_hashkey']; $this->response_hashkey = $this->settings['response_hashkey']; $this->request_saltkey = $this->settings['request_saltkey']; $this->response_saltkey = $this->settings['response_saltkey']; $this->request_aeskey = $this->settings['request_aeskey']; $this->response_aeskey = $this->settings['response_aeskey']; add_action('woocommerce_update_options_payment_gateways_'.$this->id, array($this,'process_admin_options')); //$link = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : $woocommerce->cart->get_cart_url(); $this->thank_you_page(); //http://localhost/wordpress/checkout/ // add_action('the_content', array(&$this, 'thank_you_page')); // add_action('woocommerce_thank_you_'.$this->id, array($this,'thank_you_page')); } public function init_form_fields(){ $this->form_fields = array( 'enabled' => array( 'title' => __( 'Enable/Disable', 'wc_nexapay_payment' ), 'type' => 'checkbox', 'label' => __( 'Enable or Disable nexapay Payments', 'wc_nexapay_payment' ), 'default' => 'yes' ), 'title' => array( 'title' => __( 'Title', 'wc_nexapay_payment' ), 'type' => 'text', 'description' => __( 'Add a new title for the nexapay Payments that customers will see when they are in the checkout page.', 'wc_payripe_payment' ), 'default' => __( 'NexaPay Your Digital Payments Partner', 'wc_nexapay_payment' ), 'desc_tip' => true, 'custom_attributes' => array('readonly' => 'readonly'), ), 'description' => array( 'title' => __( 'Description', 'wc_nexapay_payment' ), 'type' => 'textarea', 'default' =>__('Grow your business with the flawless integration of digital payments solutions!.', 'wc_nexapay_payment'), 'description'=> __('This controls the description which the user sees during checkout.', 'wc_nexapay_payment'), 'desc_tip'=> true, 'custom_attributes' => array('readonly' => 'readonly'), ), 'nexapay_url' => array( 'title' => __('Gateway Url', 'wc_nexapay_payment'), 'type' => 'text', 'default'=> __('https://prod.nexapay.in/payment/gateway/v1/initialrequest','wc_nexapay_payment'), 'description' => __('Will be provided by nexapay payment gateway', 'wc_nexapay_payment'), 'desc_tip' => true, 'custom_attributes' => array('readonly' => 'readonly'), ), 'key_id' => array( 'title' => __('Key Id', 'wc_nexapay_payment'), 'type' => 'text', 'description' => __('As provided by nexapay merchant website', 'wc_nexapay_payment'), 'desc_tip' => true ), 'secret_key' => array( 'title' => __('Secret Key', 'wc_nexapay_payment'), 'type' => 'text', 'description' => __('As provided by nexapay merchant website', 'wc_nexapay_payment'), 'desc_tip' => true ), 'prod_id' => array( 'title' => __('Product ID', 'wc_nexapay_payment'), 'type' => 'text', 'description' => __('Will be provided by nexapay merchant website after production movement', 'wc_nexapay_payment'), 'desc_tip' => true ), 'request_hashkey' => array( 'title' => __('Request Hashkey', 'wc_nexapay_payment'), 'type' => 'text', 'description' => __('Request hash key, provided by nexapay merchant web site', 'wc_nexapay_payment'), 'desc_tip' => true ), 'response_hashkey' => array( 'title' => __('Response Hashkey', 'wc_nexapay_payment'), 'type' => 'text', 'description' => __('Response Hashkey, provided by nexapay merchant web site', 'wc_nexapay_payment'), 'desc_tip' => true ), 'request_saltkey' => array( 'title' => __('Request Saltkey', 'wc_nexapay_payment'), 'type' => 'text', 'description' => __('Request Saltkey, provided by nexapay merchant web site', 'wc_nexapay_payment'), 'desc_tip' => true ), 'response_saltkey' => array( 'title' => __('Response Saltkey', 'wc_nexapay_payment'), 'type' => 'text', 'description' => __('Response Saltkey, provided by nexapay merchant web site', 'wc_nexapay_payment'), 'desc_tip' => true ),'request_aeskey' => array( 'title' => __('Request AESkey', 'wc_nexapay_payment'), 'type' => 'text', 'description' => __('Request AESkey, provided by nexapay merchant web site', 'wc_nexapay_payment'), 'desc_tip' => true ), 'response_aeskey' => array( 'title' => __('Response AESkey', 'wc_nexapay_payment'), 'type' => 'text', 'description' => __('Response AESkey, provided by nexapay merchant web site', 'wc_nexapay_payment'), 'desc_tip' => true ), ); } public function process_payment($order_id){ global $woocommerce; global $current_user; //get user details $current_user = wp_get_current_user(); $user_email = $current_user->user_email; $first_name = $current_user->user_login; $last_name = $current_user->shipping_last_name; $phone_number = $current_user->billing_phone; $country = $current_user->shipping_country; $state = $current_user->shipping_state; $city = $current_user->shipping_city; $postcode = $current_user->shipping_postcode; $address_1 = $current_user->shipping_address_1; $address_2 = $current_user->shipping_address_2; $udf2 = $first_name." ".$last_name; $udf3 = $country." ".$state." ".shipping_city." ".$address_1." ".$address_2." ".$postcode; // $udf4 = ""; // $udf5 = ""; $order= new WC_Order( $order_id ); $keyId = $this->key_id; $secretKey = $this->secret_key; $txnCurr = 'INR'; $amount = $order->get_total(); $emailId = $user_email; $username=$first_name; $mobileNumber = $phone_number; $prodId = $this->prod_id; $requestHashKey = $this->request_hashkey; $requestSaltKey = $this->request_saltkey; $requestAESKey = $this->request_aeskey; $message = $keyId.$secretKey.$txnCurr.$amount.$emailId.$mobileNumber; $signature =hash_hmac('sha256', $message, $requestHashKey); $myObj = (object)array(); $myObj->clientId= $this->key_id; $myObj->clientSecret= $this->secret_key; $myObj->txnCurr='INR'; $myObj->amount=$order->get_total(); $myObj->emailId= $user_email; $myObj->prodId= $this->prod_id; $myObj->username=$username; $myObj->mobileNumber=$phone_number; $myObj->signature=$signature; $myObj->udf1=$order_id; $myObj->udf2=$udf2; $myObj->udf3=$udf3; // $myObj->udf4=$udf4; // $myObj->udf5=$udf5; $myJSON = json_encode($myObj); $encryptJsonObj=$this-> encrypt($myJSON,$requestSaltKey,$requestAESKey); $order = wc_get_order($order_id); $order ->update_status('on-hold',__('Awaiting nexapay Payment','wc_nexapay_payment')); $param = "clientKey=".$keyId."&encrypt=".$encryptJsonObj; return array( 'result' => 'success', 'redirect' => MakeRequest."?key=".$keyId."&enc=".$encryptJsonObj."&url=".$this->url ); exit; } public function thank_you_page(){ global $woocommerce; global $wpdb, $woocommerce; $content = ""; $content .= '
'; $content .= '

nexapay Thank you

'; if(isset($_POST['secureData'])){ add_action('the_content', array(&$this, 'thank_you_page')); $responseData = $_POST['secureData']; $responesSaltKey = $this->response_saltkey; $responesAESKey = $this->response_aeskey; $decryptJsonObj = $this->decrypt($responseData,$responesSaltKey,$responesAESKey); $content .= '
'; // Convert JSON string to Array $dataArray = json_decode($decryptJsonObj, true); // $content .= "Json : ".$decryptJsonObj; // $content .="
"; // =============== response code end ============ $valid = $dataArray['status'].$dataArray['orderId'].$dataArray['transactionId'].$dataArray['bankId'].$dataArray['description']; // generate hmac sha 256 hashkey $signature= hash_hmac('sha256', $valid, $this->response_hashkey); // $content .="
"; // $content .= $signature; //================= validate signature ======================== if($dataArray['signature']==$signature){ $content .= "Status : ".$dataArray['status']; //$content .="
"; // $content .= "Client Id : ".$dataArray['clientId']; $content .="
"; $content .= "Order Id : ".$dataArray['orderId']; $content .="
"; $content .= "Bank Id : ".$dataArray['bankId']; $content .="
"; $content .= "Transaction Id : ".$dataArray['transactionId']; $content .="
"; $content .= "Amount : ".$dataArray['amount']; $content .="
"; $content .= "Email Id : ".$dataArray['emailId']; $content .="
"; $content .= "Mobile Number : ".$dataArray['mobileNumber']; // $content .="
"; //$content .= "Signature : ".$dataArray['signature']; $content .="
"; $content .= "Date : ".$dataArray['date']; $content .="
"; $content .= "Description : ".$dataArray['description']; $content .= "
"; // $content .= "Valid Transaction"; $content .= "
"; $order = new WC_Order($dataArray['udf1']); if($dataArray['status']=="200"){ $order->update_status('wc-completed',__('Payment Completed By nexapay.','wc_nexapay_payment')); }else if($dataArray['status']=="400"){ $order->update_status('wc-failed'); }else if($dataArray['status']=="402"){ $order->update_status('wc-cancelled'); } }else{ $content .= "
"; $content .= "Invalid Transaction"; $content .= "
"; } $content .= '
'; } $content .= '
'; return $content; } public function encrypt($data, $salt,$key) { if($key != NULL && $data != "" && $salt != ""){ $method = "AES-256-CBC"; /*Converting Array to bytes*/ $iv = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; $chars = array_map("chr", $iv); $IVbytes = join($chars); $salt1 = mb_convert_encoding($salt, "UTF-8"); /*Encoding to UTF-8*/ $key1 = mb_convert_encoding($key, "UTF-8"); /*Encoding to UTF-8*/ /*SecretKeyFactory Instance of PBKDF2WithHmacSHA1 Java Equivalent*/ $hash = openssl_pbkdf2($key1,$salt1,'256','65536', 'sha1'); $encrypted = openssl_encrypt($data, $method, $hash, OPENSSL_RAW_DATA, $IVbytes); return bin2hex($encrypted); }else{ return "String to encrypt, Salt and Key is required."; } } public function decrypt($data, $salt, $key) { if($key != NULL && $data != "" && $salt != ""){ $dataEncypted = hex2bin($data); $method = "AES-256-CBC"; /*Converting Array to bytes*/ $iv = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; $chars = array_map("chr", $iv); $IVbytes = join($chars); $salt1 = mb_convert_encoding($salt, "UTF-8");/*Encoding to UTF-8*/ $key1 = mb_convert_encoding($key, "UTF-8");/*Encoding to UTF-8*/ /*SecretKeyFactory Instance of PBKDF2WithHmacSHA1 Java Equivalent*/ $hash = openssl_pbkdf2($key1,$salt1,'256','65536', 'sha1'); $decrypted = openssl_decrypt($dataEncypted, $method, $hash, OPENSSL_RAW_DATA, $IVbytes); return $decrypted; }else{ return "Encrypted String to decrypt, Salt and Key is required."; } } }// class end add_filter('woocommerce_payment_gateways','add_to_nexapay_payment_gateway'); function add_to_nexapay_payment_gateway($gateways){ $gateways[] = 'WC_nexapay_Payment_Gateway'; return $gateways; } } } Chairs – Crafted Comforts https://craftedcomforts.in Thu, 19 Oct 2023 13:43:56 +0000 en hourly 1 https://wordpress.org/?v=7.0 https://craftedcomforts.in/wp-content/uploads/2023/10/cropped-Screenshot-2023-10-19-202052-1-32x32.png Chairs – Crafted Comforts https://craftedcomforts.in 32 32 IRA Rich Wooden Vintage Peacock Chair for Living Room https://craftedcomforts.in/product/ira-rich-wooden-vintage-peacock-chair-for-living-room/ Thu, 19 Oct 2023 13:43:03 +0000 https://craftedcomforts.in/?post_type=product&p=1967 Technical Details
Colour ‎Brown
Brand ‎IRA
Product Dimensions ‎143D x 60W x 56H Centimeters
Style ‎Retro
Special Feature ‎Arm Rest
Material ‎Rattan
Pattern ‎King chair
Recommended Uses For Product ‎Dining
Finish Type ‎Varnished
Room Type ‎Hallway
Frame Material ‎Iron, Engineered Wood
Age Range (Description) ‎Adult
Net Quantity ‎1.00 count
What is in the box? ‎Includes 1 leaf
Item Weight ‎10 Kilograms
Model Name ‎Chair
Furniture base movement ‎Glide
Color ‎Brown
Is Assembly Required ‎No
Assembly Type ‎Require Assembly
Primary material ‎Rattan
Type of Wood ‎Iron, Engineered Wood
Top Material ‎Iron,Mdf
Capacity ‎Medium
Number of Pieces ‎1
Mattress Comfort ‎Upholstered
Number of Shelves ‎1
Item Model Number ‎IRA Furniture_76
Manufacturer ‎IRA Furniture, ccirafurniture@gmail.com
Country of Origin ‎India

]]>
DKLGG Faux Fur Desk Chair, Cute Fluffy Upholstered Padded Seat, Vanity Accent Modern Height Adjustable Swivel Arm Decorative Furniture for Living Room/Makeup/Home Office/Teen Girls Bedroom, Pink https://craftedcomforts.in/product/dklgg-faux-fur-desk-chair-cute-fluffy-upholstered-padded-seat-vanity-accent-modern-height-adjustable-swivel-arm-decorative-furniture-for-living-room-makeup-home-office-teen-girls-bedroom-pink/ Thu, 19 Oct 2023 13:43:03 +0000 https://craftedcomforts.in/?post_type=product&p=1968 Technical Details
Colour ‎Pink
Brand ‎DKLGG
Style ‎Modern
Special Feature ‎Swivel, Adjustable_Height
Material ‎Faux Fur, Metal
Recommended Uses For Product ‎Office
Room Type ‎Office, Bedroom, Living Room
Frame Material ‎Metal
Age Range (Description) ‎Adult
Net Quantity ‎1.0 count
Included Components ‎n
Item Weight ‎19 Pounds
Shape ‎Round
Model Name ‎DKLGG
Maximum Weight Recommendation ‎250 Pounds
Furniture base movement ‎Swivel
Form Factor ‎Upholstered,Modern
Furniture Finish ‎Silver Finish
Fill Material ‎Foam
Manufacturer ‎DKLGG
Item model number ‎DKLGG
ASIN ‎B091FW2QHM

]]>
IRA Furniture Rattan Easy Chair with Cushion for Garden Balcony (Standard Size, Brown) https://craftedcomforts.in/product/ira-furniture-rattan-easy-chair-with-cushion-for-garden-balcony-standard-size-brown/ Thu, 19 Oct 2023 13:42:40 +0000 https://craftedcomforts.in/?post_type=product&p=1912 Technical Details
Manufacturer ‎IRA Furniture, ccirafurniture@gmail.com
Country of Origin ‎India
Item model number ‎IRA Furniture_62
ASIN ‎B09X5NP23P
Additional Information
Manufacturer IRA Furniture, ccirafurniture@gmail.com
Item Weight 50 kg
Item Dimensions LxWxH 60 x 60 x 60 Centimeters
Net Quantity 1.00 count
Included Components Includes 1 leaf

]]>
Cello Comfort Relaxing Plastic Chair | Cello Chair | Plastic Chair | Beige Colour | Comfort Chair | Chairs (Set of 2) https://craftedcomforts.in/product/cello-comfort-relaxing-plastic-chair-cello-chair-plastic-chair-beige-colour-comfort-chair-chairs-set-of-2/ Thu, 19 Oct 2023 13:42:40 +0000 https://craftedcomforts.in/?post_type=product&p=1913 Technical Details
Colour ‎Beige
Brand ‎ADINATH FURNITURE MALL
Product Dimensions ‎50D x 30W x 30H Centimeters
Style ‎Set of 2
Special Feature ‎Arm Rest, Ergonomic, Head Support
Material ‎Plastic
Recommended Uses For Product ‎Relaxing
Finish Type ‎Wood
Room Type ‎Living Room
Frame Material ‎Plastic
Age Range (Description) ‎Adult
Back Style ‎Solid Back
Net Quantity ‎2.00 count
Included Components ‎1 Strong and Durable Chair
Item Weight ‎1.9 Kilograms
Shape ‎Rectangular
Model Name ‎Comfort Beige Pack_2
Product Care Instructions ‎Hand_Wash
Furniture base movement ‎Rock
Indoor/Outdoor Usage ‎Indoor
Form Factor ‎Recliner
Furniture Finish ‎Plastic
Size ‎160 x 200 cm
Manufacturer ‎Cello
Country of Origin ‎India
Item model number ‎Comfort Beige Pack_2
ASIN ‎B097K5D8YY

]]>
Nemi Agency Nilkamal High Gloss Finish Mid Back Plastic Chair (Brown and Biscuit) – Pack of 2 https://craftedcomforts.in/product/nemi-agency-nilkamal-high-gloss-finish-mid-back-plastic-chair-brown-and-biscuit-pack-of-2/ Thu, 19 Oct 2023 13:42:40 +0000 https://craftedcomforts.in/?post_type=product&p=1914 Technical Details
Colour ‎Brown
Brand ‎Nemi Agency
Product Dimensions ‎60D x 60W x 87H Centimeters
Style ‎Modern
Special Feature ‎Ergonomic
Material ‎Plastic
Recommended Uses For Product ‎Relaxing, Reading
Room Type ‎Living Room, Patio Garden
Frame Material ‎Plastic
Age Range (Description) ‎Adult
Back Style ‎Solid Back
Net Quantity ‎2.0 count
What is in the box? ‎2 Chairs
Item Weight ‎3 Kilograms
Model Name ‎Nilkamal CHR2226
Maximum Weight Recommendation ‎200 Kilograms
Seat Material Type ‎Polypropylene
Color ‎Brown
Is Assembly Required ‎No
Assembly Type ‎Already Assembled
Primary material ‎Plastic
Type of Wood ‎Plastic
Capacity ‎Standard
Number of Pieces ‎2
Mattress Comfort ‎Ergonomic Design,Stackable
Number of Shelves ‎1
Shipping Weight ‎6.37 Kilograms
Item Model Number ‎2226 SRB/BST Chairs Set Of 2
Manufacturer ‎Nilkamal
Country of Origin ‎India

]]>
Waahkart Home Decor Stylish Wooden Color Look Royal Emperor Arm Chair Set of 2 https://craftedcomforts.in/product/waahkart-home-decor-stylish-wooden-color-look-royal-emperor-arm-chair-set-of-2/ Thu, 19 Oct 2023 13:42:40 +0000 https://craftedcomforts.in/?post_type=product&p=1915 Technical Details
Colour ‎Brown
Brand ‎Waahkart
Product Dimensions ‎76.2D x 57.9W x 182.9H Centimeters
Material ‎Wood
Finish Type ‎Wooden
Room Type ‎Living Room
Frame Material ‎Wood
Age Range (Description) ‎Adult
Net Quantity ‎2.0 count
Included Components ‎FRP
Item Weight ‎27.5 Kilograms
Size ‎Height-6 feet,Width-2.5 feet, Depth-1.9 feet
Manufacturer ‎Waahkart
Country of Origin ‎India
Item part number ‎124587964587
ASIN ‎B085FZDY4T

]]>
IRA Furniture Wooden Arm Chair for Living Room | Armchair for Outdoor & Balcony | Cane Wood, Light Brown https://craftedcomforts.in/product/ira-furniture-wooden-arm-chair-for-living-room-armchair-for-outdoor-balcony-cane-wood-light-brown/ Thu, 19 Oct 2023 13:42:40 +0000 https://craftedcomforts.in/?post_type=product&p=1916 Technical Details
Colour ‎Brown
Brand ‎IRA
Product Dimensions ‎61D x 86W x 96H Centimeters
Material ‎Rattan
Recommended Uses For Product ‎Dining
Finish Type ‎Wood,Wooden
Room Type ‎Living Room, Patio Garden
Frame Material ‎Iron, Engineered Wood
Net Quantity ‎1.00 count
Included Components ‎Includes 1 leaf
Model Name ‎Chair
Size ‎Medium
Manufacturer ‎IRA Furniture, ccirafurniture@gmail.com
Country of Origin ‎India
Item model number ‎IRA Furniture_73
ASIN ‎B09XXQMTJ9

]]>
Shilpi Wooden Arm Chair with Cushions(Natural Teak) – Indian Sheesham Wood with Special PU Polish https://craftedcomforts.in/product/shilpi-wooden-arm-chair-with-cushionsnatural-teak-indian-sheesham-wood-with-special-pu-polish/ Thu, 19 Oct 2023 13:42:40 +0000 https://craftedcomforts.in/?post_type=product&p=1917 Technical Details
Colour ‎Brown
Brand ‎Shilpi
Material ‎Sheesham Wood
Recommended Uses For Product ‎Office
Room Type ‎Office, Bedroom
Frame Material ‎Teak Wood, Sheesham
Age Range (Description) ‎Adult
Back Style ‎Solid Back
Net Quantity ‎1.0 count
Included Components ‎Wood
Furniture base movement ‎Glide
Indoor/Outdoor Usage ‎Indoor
Form Factor ‎Recliner
Furniture Finish ‎Teak
Size ‎Standard
Manufacturer ‎Shilpi
Country of Origin ‎India
Item part number ‎SHC HDM1002
ASIN ‎B07942FZLQ

]]>
TJ Arc Lounge Chair | Wooden Chair Design | Sagwan Wood | Furniture https://craftedcomforts.in/product/tj-arc-lounge-chair-wooden-chair-design-sagwan-wood-furniture/ Thu, 19 Oct 2023 13:42:18 +0000 https://craftedcomforts.in/?post_type=product&p=1874 Technical Details
Colour ‎Multicolour
Brand ‎TJ Deco Furniture
Product Dimensions ‎70D x 61W x 87H Centimeters
Style ‎Retro
Special Feature ‎Arm Rest
Material ‎Sagwan Wood
Pattern ‎Striped
Recommended Uses For Product ‎Relaxing
Finish Type ‎Wood,Wooden
Room Type ‎Living Room
Frame Material ‎Wood
Age Range (Description) ‎Adult
Back Style ‎Solid Back
Net Quantity ‎1.0 count
Included Components ‎Includes 1 leaf
Theme ‎Zebras
Shape ‎Square
Arm Style ‎With-arms
Form Factor ‎Single Seater
Furniture Finish ‎Walnut
Fill Material ‎Foam
Size ‎Full
Manufacturer ‎TJ Traders
Country of Origin ‎India
Item model number ‎A221
ASIN ‎B09X367687

]]>
IRA Furniture Rattan Elegant Arm Chair with Table and Cushion https://craftedcomforts.in/product/ira-furniture-rattan-elegant-arm-chair-with-table-and-cushion/ Thu, 19 Oct 2023 13:42:18 +0000 https://craftedcomforts.in/?post_type=product&p=1875 Technical Details
Manufacturer ‎IRA Furniture, ccirafurniture@gmail.com
Country of Origin ‎India
Item model number ‎IRA Furniture_64
ASIN ‎B09X5NFCJS
Additional Information
Manufacturer IRA Furniture, ccirafurniture@gmail.com
Item Weight 50 kg
Item Dimensions LxWxH 60 x 60 x 60 Centimeters
Net Quantity 1.00 count
Included Components Includes 1 leaf

]]>