0

Magento 2 chekout page not rendered when clicking on place order button. want to use an external payment gateway.

debug.log 2018-10-10 08:01:56] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["interception","CONFIG"],"mode":"matchingTag"}} [] [2018-10-10 08:04:37] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["interception","CONFIG"],"mode":"matchingTag"}} [] [2018-10-10 08:05:02] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["interception","CONFIG"],"mode":"matchingTag"}} [] [2018-10-10 08:05:19] main.DEBUG: cache_invalidate: {"method":"GET","url":"http://testing2.dukaania.com/","invalidateInfo":{"tags":["interception","CONFIG"],"mode":"matchingTag"}} []

=================

system.log [2018-10-10 08:07:47] main.INFO: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] [] [2018-10-10 08:07:47] main.INFO: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] [] [2018-10-10 08:07:47] main.INFO: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] [] [2018-10-10 08:07:47] main.INFO: Broken reference: the 'paypal.partner.right.logo' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] [] [2018-10-10 08:07:47] main.INFO: Broken reference: the 'bml.right.logo' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] [] [2018-10-10 08:07:52] main.INFO: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] [] [2018-10-10 08:07:52] main.INFO: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] [] [2018-10-10 08:07:52] main.INFO: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] [] [2018-10-10 08:08:08] main.CRITICAL: Unable to resolve the source file for 'frontend/MageBig/martfury_layout01/en_US/MageBig_MbLib/js/jquery.nanoscroller.js.map' [] []

Here' my code

/home1/dukaania/public_html/testing2/app/code/Test/Testpayment/view/frontend/web/js/action/set-payment-method-action.js

/jshint jquery:true/

 define(
[
    'jquery',
    'Magento_Checkout/js/model/quote',
    'Magento_Checkout/js/model/url-builder',
    'mage/storage',
    'Magento_Checkout/js/model/error-processor',
    'Magento_Customer/js/model/customer',
    'Magento_Checkout/js/model/full-screen-loader'
],
function ($, quote, urlBuilder, storage, errorProcessor, customer, fullScreenLoader) {
    'use strict';
    return function (messageContainer) {

         $url = 'http://testing2.dukaania.com/response_fail.php';
$.mage.redirect($url);//url is your url

    };
}

);

/home1/dukaania/public_html/testing2/app/code/Test/Testpayment/view/frontend/web/template/payment/testpayment.html

  <div class="payment-method" data-bind="css: {'_active': (getCode() == isChecked())}">
<div class="payment-method-title field choice">
    <input type="radio"
           name="payment[method]"
           class="radio"
           data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>
    <label data-bind="attr: {'for': getCode()}" class="label"><span data-bind="text: getTitle()"></span></label>
</div>
<div class="payment-method-content">
    <div class="actions-toolbar">
        <div class="primary">
            <button class="action primary checkout"
                    type="submit"
                    data-bind="
                    click: placeOrder,
                    attr: {title: $t('Place Order')},
                    css: {disabled: !isPlaceOrderActionAllowed()},
                    enable: (getCode() == isChecked())
                    "
                    disabled>
                <span data-bind="i18n: 'Place Order'"></span>
            </button>
        </div>
    </div>
</div>

1 Answer 1

0

Did you set up the method-renderer JS?

file like at location /view/frontend/web/js/view/payment/method-renderer/testpayment.js in your case it will be a different file name.

check this - https://webkul.com/blog/redirect-to-third-party-link-after-order-place-magento2/

it is covering your stuff.

3
  • i m following this tutorial but nothing gonna happen page not rendered Oct 10, 2018 at 9:35
  • can you provide your full module code here? Oct 10, 2018 at 13:42
  • can we discuss in chat I sent u a link I uploaded on google drive? Oct 11, 2018 at 4:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.