Customer not Directed to the Payment Review Page after Checkout after using the Make A Payment Flow

In the following implementations, customers are not directed to the payment review page after checking out using the Make A Payment flow, even when Windcave is the only configured payment method:

These patch instructions describe the steps to fix this problem so that customers are directed to the correct payment review page.

To implement this patch, create a custom module to override the OrderWizard.Module.PaymentMethod.Selector.js JavaScript file which is part of the OrderWizard.Module.PaymentMethod module.

If you are not familiar with implementing patches for SuiteCommerce Advanced, refer to the following:

Step 1: Create the Override File

  1. Following the instructions in the Patch Using Override Mode procedure, create a new directory and file: /Modules/suitecommerce/ExternalPayment@1.0.0/SuiteScript/ExternalPayment.Model.js

  2. In the new ExternalPayment.Model.js file, in the _isDone method, find the following line of code:

                    , status_hold_value = this._getConfiguration(record_type, 'statusHoldValue', 'HOLD'); 
    
                  

    And replace it with the following code:

                    , status_hold_value = this._getConfiguration(record_type, 'statusHoldValue', 'HOLD')
    , status_success_value = this._getConfiguration(record_type, 'statusSuccessValue', 'SUCCESS'); 
    
                  
  3. In the same file, find the following line of code:

                    return status === status_accept_value || status === status_hold_value; 
    
                  

    And replace it with the following code:

                    return status === status_accept_value || status === status_hold_value || status === status_success_value; 
    
                  
  4. In the _getStatusFromRequest method, find the following line of code:

                    return request.getParameter(this._getConfiguration(record_type, 'statusParameterName' , 'status')); 
    
                  

    And replace it with the following code:

                    var default_status = 'status';
    if(record_type === 'customerpayment') {
     default_status = 'nlstatus';
    }
    return request.getParameter(this._getConfiguration(record_type, 'statusParameterName' , default_status)) 
    
                  
  5. In the _validateStatusFromRequest method, find the following line of code:

                    , status_reject_value = this._getConfiguration(record_type, 'statusRejectValue' , 'REJECT'); 
    
                  

    And replace it with the following code:

                    , status_reject_value = this._getConfiguration(record_type, 'statusRejectValue' , 'REJECT') 
    , status_success_value = this._getConfiguration(record_type, 'statusAcceptValue', 'SUCCESS'); 
    
                  
  6. In the same file, find the following line of code:

                    return status === status_accept_value || status === status_hold_value || status === status_reject_value; 
    
                  

    And replace it with the following code:

                    return status === status_accept_value || status === status_hold_value || status === status_reject_value || status === status_success_value; 
    
                  
  7. In the _getDataFromRedirect method, find the following line of code:

                    , configration_parameters = this._getConfiguration(record_type, 'parameters' , ['tranid', 'authcode', 'status']) 
    
                  

    And replace it with the following code:

                    , configration_parameters = this._getConfiguration(record_type, 'parameters' , ['tranid', 'result','authcode', 'status', 'nlstatus']) 
    
                  
  8. Save the file.

Step 2: Prepare the Developer Tools For Your Patch

When preparing the Developer Tools for your patch as described in the Patch Using Override Mode procedure, perform the following actions:

  1. Paste the following sample code into the new ns.package.json file that you create in the Modules directory: /Modules/extensions/SspLibraries@1.0.0/ns.package.json

                      {
       "gulp": {
          "javascript": [
             "JavaScript/*.js"
          ]
       },
       "overrides": {
          "suitecommerce/ExternalPayment@X.Y.Z/SuiteScript/ExternalPayment.Model.js" : "SuiteScript/ExternalPayment.Model.js"
       }
    } 
    
                  
    Important:

    You must replace the string X.Y.Z with the version of the module in your implementation of SuiteCommerce Advanced.

  2. Open the distro.json file in the root SuiteCommerce Advanced development directory and then add your custom module to the modules object as described in the Patch Using Override Mode procedure. The following sample shows the value to add to the list of existing values that follow the “modules” key.

                    "modules": {
        ""extensions/ExternalPaymentExtension": "1.0.0",
        . . . 
    
                  

Step 3: Test and Deploy Your Patch

Follow the instructions provided in the Patch Using Override Mode procedure to test and deploy your patch.

Related Topics

SCA Patches

General Notices