Plugin Directory

Changeset 2773476


Ignore:
Timestamp:
08/22/2022 01:12:22 PM (4 years ago)
Author:
devcashfree
Message:

Update to version 4.3.6

Location:
cashfree
Files:
26 added
5 edited

Legend:

Unmodified
Added
Removed
  • cashfree/trunk/assets/js/checkout.js

    r2753558 r2773476  
    99        const  successCallback  =  function (data) {
    1010            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);
    1214        }
    1315
    1416        //Create Failure Callback
    1517        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);
    1727        }
    1828
     
    3040       
    3141        //Submit callback form
    32         const  woocommerceFormSubmit  =  function (data, url) {
     42        const  woocommerceFormSubmit  =  function (data, transactionId, transactionStatus, url) {
    3343            pippin_form=document.createElement('FORM');
    3444            pippin_form.name='cashfreeForm';
     
    4555            pippin_tb.type='HIDDEN';
    4656            pippin_tb.name='transaction_status';
    47             pippin_tb.value=data.transaction.txStatus;
     57            pippin_tb.value=transactionStatus;
    4858            pippin_form.appendChild(pippin_tb);
    4959
     
    5767            pippin_tb.type='HIDDEN';
    5868            pippin_tb.name='transaction_id';
    59             pippin_tb.value=data.transaction.transactionId;
     69            pippin_tb.value=transactionId;
    6070            pippin_form.appendChild(pippin_tb);
    6171
     
    6373            pippin_tb.type='HIDDEN';
    6474            pippin_tb.name='transaction_msg';
    65             pippin_tb.value=data.transaction.txMsg;
     75            pippin_tb.value=data.order.message;
    6676            pippin_form.appendChild(pippin_tb);
    6777            document.body.appendChild(pippin_form);
  • cashfree/trunk/cashfree.php

    r2762270 r2773476  
    22/**
    33 * Plugin Name: Cashfree
    4  * Version: 4.3.5
     4 * Version: 4.3.6
    55 * Plugin URI: https://github.com/cashfree/cashfree-woocommerce
    66 * Description: Payment gateway plugin by Cashfree Payments for Woocommerce sites.
  • cashfree/trunk/includes/request/class-wc-cashfree-request-checkout.php

    r2753558 r2773476  
    2020     */
    2121    public static function build( $order_id, $gateway ) {
     22        require_once WC_CASHFREE_DIR_PATH . 'includes/request/class-wc-cashfree-request-billing.php';
    2223
    2324        $order = wc_get_order( $order_id );
     
    3334
    3435        $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        }
    3542
    3643        $data = array(
     
    3845                "customer_id"       => $customerId,
    3946                "customer_email"    => $customerEmail,
    40                 "customer_phone"    => $customerPhone
     47                "customer_phone"    => $customerPhone,
     48                "customer_name"     => $customerName
    4149            ),
    4250            "order_id"          => (string) $order_id,
  • cashfree/trunk/includes/settings/cashfree-payments.php

    r2747397 r2773476  
    4444        'type'          => 'checkbox',
    4545        'label'         => __( 'Enable Cashfree sandbox', 'cashfree' ),
    46         'default'       => 'yes',
     46        'default'       => 'no',
    4747        'description'   => __( 'Cashfree sandbox can be used to test payments.', 'cashfree' ),
    4848    ),
  • cashfree/trunk/readme.txt

    r2762270 r2773476  
    44Tested up to: 6.0
    55Requires PHP: 5.6
    6 Stable tag: 4.3.5
    7 Version: 4.3.5
     6Stable tag: 4.3.6
     7Version: 4.3.6
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    3333
    3434== 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
    3539
    3640= 4.3.5 =
Note: See TracChangeset for help on using the changeset viewer.