Changeset 2773476
- Timestamp:
- 08/22/2022 01:12:22 PM (4 years ago)
- Location:
- cashfree
- Files:
-
- 26 added
- 5 edited
-
tags/4.3.6 (added)
-
tags/4.3.6/LICENSE (added)
-
tags/4.3.6/README.md (added)
-
tags/4.3.6/assets (added)
-
tags/4.3.6/assets/js (added)
-
tags/4.3.6/assets/js/checkout.js (added)
-
tags/4.3.6/cashfree.php (added)
-
tags/4.3.6/includes (added)
-
tags/4.3.6/includes/class-wc-cashfree-api.php (added)
-
tags/4.3.6/includes/gateways (added)
-
tags/4.3.6/includes/gateways/class-wc-cashfree-gateway.php (added)
-
tags/4.3.6/includes/gateways/class-wc-cashfree-payments.php (added)
-
tags/4.3.6/includes/http (added)
-
tags/4.3.6/includes/http/class-wc-cashfree-adapter.php (added)
-
tags/4.3.6/includes/request (added)
-
tags/4.3.6/includes/request/class-wc-cashfree-request-billing.php (added)
-
tags/4.3.6/includes/request/class-wc-cashfree-request-checkout.php (added)
-
tags/4.3.6/includes/request/class-wc-cashfree-request-items.php (added)
-
tags/4.3.6/includes/request/class-wc-cashfree-request-shipping.php (added)
-
tags/4.3.6/includes/settings (added)
-
tags/4.3.6/includes/settings/cashfree-payments.php (added)
-
tags/4.3.6/includes/wc-cashfree-functions.php (added)
-
tags/4.3.6/includes/wc-cashfree-scripts.php (added)
-
tags/4.3.6/readme.txt (added)
-
tags/4.3.6/templates (added)
-
tags/4.3.6/templates/payment-fields.php (added)
-
trunk/assets/js/checkout.js (modified) (5 diffs)
-
trunk/cashfree.php (modified) (1 diff)
-
trunk/includes/request/class-wc-cashfree-request-checkout.php (modified) (3 diffs)
-
trunk/includes/settings/cashfree-payments.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cashfree/trunk/assets/js/checkout.js
r2753558 r2773476 9 9 const successCallback = function (data) { 10 10 dismissflag = false; 11 woocommerceFormSubmit(data, wc_cashfree_checkout_params.capture_url); 11 var transactionId = data.transaction.transactionId; 12 var transactionStatus = data.transaction.txStatus; 13 woocommerceFormSubmit(data, transactionId, transactionStatus, wc_cashfree_checkout_params.capture_url); 12 14 } 13 15 14 16 //Create Failure Callback 15 17 const failureCallback = function (data) { 16 woocommerceFormSubmit(data, wc_cashfree_checkout_params.cancel_url); 18 dismissflag = false; 19 var transactionId = ""; 20 var transactionStatus = "ERROR"; 21 if(data.transaction !== null && data.order.status !== "ERROR") { 22 transactionId = data.transaction.transactionId; 23 transactionStatus = data.transaction.txStatus; 24 } 25 26 woocommerceFormSubmit(data, transactionId, transactionStatus, wc_cashfree_checkout_params.cancel_url); 17 27 } 18 28 … … 30 40 31 41 //Submit callback form 32 const woocommerceFormSubmit = function (data, url) {42 const woocommerceFormSubmit = function (data, transactionId, transactionStatus, url) { 33 43 pippin_form=document.createElement('FORM'); 34 44 pippin_form.name='cashfreeForm'; … … 45 55 pippin_tb.type='HIDDEN'; 46 56 pippin_tb.name='transaction_status'; 47 pippin_tb.value= data.transaction.txStatus;57 pippin_tb.value=transactionStatus; 48 58 pippin_form.appendChild(pippin_tb); 49 59 … … 57 67 pippin_tb.type='HIDDEN'; 58 68 pippin_tb.name='transaction_id'; 59 pippin_tb.value= data.transaction.transactionId;69 pippin_tb.value=transactionId; 60 70 pippin_form.appendChild(pippin_tb); 61 71 … … 63 73 pippin_tb.type='HIDDEN'; 64 74 pippin_tb.name='transaction_msg'; 65 pippin_tb.value=data. transaction.txMsg;75 pippin_tb.value=data.order.message; 66 76 pippin_form.appendChild(pippin_tb); 67 77 document.body.appendChild(pippin_form); -
cashfree/trunk/cashfree.php
r2762270 r2773476 2 2 /** 3 3 * Plugin Name: Cashfree 4 * Version: 4.3. 54 * Version: 4.3.6 5 5 * Plugin URI: https://github.com/cashfree/cashfree-woocommerce 6 6 * Description: Payment gateway plugin by Cashfree Payments for Woocommerce sites. -
cashfree/trunk/includes/request/class-wc-cashfree-request-checkout.php
r2753558 r2773476 20 20 */ 21 21 public static function build( $order_id, $gateway ) { 22 require_once WC_CASHFREE_DIR_PATH . 'includes/request/class-wc-cashfree-request-billing.php'; 22 23 23 24 $order = wc_get_order( $order_id ); … … 33 34 34 35 $customerPhone = self::get_phone_number($order); 36 $billing_address = WC_Cashfree_Request_Billing::build( $order_id ); 37 $customerName = ""; 38 39 if(!empty($billing_address) == true) { 40 $customerName = $billing_address['data']['full_name']; 41 } 35 42 36 43 $data = array( … … 38 45 "customer_id" => $customerId, 39 46 "customer_email" => $customerEmail, 40 "customer_phone" => $customerPhone 47 "customer_phone" => $customerPhone, 48 "customer_name" => $customerName 41 49 ), 42 50 "order_id" => (string) $order_id, -
cashfree/trunk/includes/settings/cashfree-payments.php
r2747397 r2773476 44 44 'type' => 'checkbox', 45 45 'label' => __( 'Enable Cashfree sandbox', 'cashfree' ), 46 'default' => ' yes',46 'default' => 'no', 47 47 'description' => __( 'Cashfree sandbox can be used to test payments.', 'cashfree' ), 48 48 ), -
cashfree/trunk/readme.txt
r2762270 r2773476 4 4 Tested up to: 6.0 5 5 Requires PHP: 5.6 6 Stable tag: 4.3. 57 Version: 4.3. 56 Stable tag: 4.3.6 7 Version: 4.3.6 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 33 33 34 34 == Changelog == 35 36 = 4.3.6 = 37 * Bugfix for hdfc pay later response while failure 38 * Add customer name for payment detail for merchant dashboard 35 39 36 40 = 4.3.5 =
Note: See TracChangeset
for help on using the changeset viewer.