I am adding a token in payment additional data
getData: function () {
return {
'method': "pay_cc",
'additional_data': {
'token_code': this.getToken(),
}
};
},
setting this 'token_code' with function
getToken:function(){
return this.paymentToken;
},
before place order I am generating token and setting setting this before calling 'self.plcaseOrder()' function
this.paymentToken = response[0];
console.log("TOKEN CODE");
console.log(this.paymentToken);
self.placeOrder();
return true;
When I access this in magento payment method authorize function I am getting null.
How Can I set this token_code??