Skip to content

Commit

Permalink
Fixed javascript for magento 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Pieters committed Jul 6, 2016
1 parent 62972bf commit 56880e7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions view/frontend/web/js/view/payment/method-renderer/default.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
/*browser:true*/
/*global define*/
define(
[
[
'jquery',
'Magento_Checkout/js/view/payment/default',
'Magento_Checkout/js/model/payment/additional-validators'
'mage/url'
],
function ($, Component, additionalValidators) {
function ($, Component, url) {
'use strict';
return Component.extend({
redirectAfterPlaceOrder: false,

defaults: {
template: 'Paynl_Payment/payment/default'
},
getInstructions: function () {
return window.checkoutConfig.payment.instructions[this.item.method];
},
getPaymentIcon: function(){
getPaymentIcon: function () {
return window.checkoutConfig.payment.icon[this.item.method];
},
afterPlaceOrder: function () {
$.mage.redirect('/paynl/checkout/redirect');
window.location.replace(url.build('/paynl/checkout/redirect'));
},

});
}
);

0 comments on commit 56880e7

Please sign in to comment.