-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Magneto 2.4.1 With Latest Version Of Square Payment, Credit card come from I-frame and Can't Translate the Card Number, CVV, and others info which come from the I-frame.
I want to translate Square Payment - Credit card data. But problem is latest magento 2.4.1 wit latest Square extension has create card with Iframe so It can't be translate with Jquery, JS, CSS anything can't work on Iframe on this Square Payment.
I also check the square payment module, connection module, square module. But changed follow there instruction which is not magento related its related to API. But nothing works.
Examples::
The Card number is in place holder, I want to translate it change it. Before old square it wasn't iframe so change easily by some how. But now its totally change so I can't translate it.
Solution may be::
Some where JS need to edit to create card with place holder request. Bellow method I tried.
I added latest 2021 square extension on Magneto 2. But problem is can't translate Card Number CVV etc. Also can't delete the ZIP here also. /vendor/square/module-squareup-omni/view/frontend/web/js/view/payment/method-renderer/square.js There was:
window.squareupCardOnFileUsed = false;
console.log('Initing payment');
await this.squareCard();
await this.squareApplePay();
await this.squareGooglePay();
But I added there follow there extension try to add css, try to add place holder but it not work. The card come from Iframe::
<iframe frameborder="0" height="50px" name="single-card-fdaa89d8-d4a9-f8a9-b53e-6d5931c1bed0" scrolling="no" src="https://web.squarecdn.com/0.0.25/single-card-element-iframe.html" width="100%" class="sq-card-component"></iframe>
I also use::
var tid2 = setInterval(function () {
if($('iframe.sq-card-component').length){
//console.log($('iframe.sq-card-component'));
//alert('test');
//$('input[placeholder="Card number"]').attr('placeholder','test');
var head = $("iframe.sq-card-component").contents().find("head");
var css = '<style>input{ visibility: hidden!important; }</style>';
$(head).append(css);
/*var tid3 = setInterval(function () {
//$('div#payment_form_squareup_payment form#nonce-form iframe').contents().find('input').hide();
}, 2000);*/
//alert('test');
clearInterval( tid2 );
}
}, 2000);