Skip to content

Commit 7744c23

Browse files
committed
MC-41281: [Magento Cloud] Payments captcha not working as expected
1 parent 69f3cd0 commit 7744c23

File tree

1 file changed

+10
-7
lines changed
  • app/code/Magento/Captcha/view/frontend/web/js/action

1 file changed

+10
-7
lines changed

app/code/Magento/Captcha/view/frontend/web/js/action/refresh.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@
44
*/
55

66
define([
7-
'mage/storage'
8-
], function (storage) {
7+
'jquery', 'mage/url'
8+
], function ($, urlBuilder) {
99
'use strict';
1010

1111
return function (refreshUrl, formId, imageSource) {
12-
return storage.post(
13-
refreshUrl,
14-
JSON.stringify({
12+
return $.ajax({
13+
url: urlBuilder.build(refreshUrl),
14+
type: 'POST',
15+
async: false,
16+
data: JSON.stringify({
1517
'formId': formId
1618
}),
17-
false
18-
).done(
19+
global: false,
20+
contentType: 'application/json',
21+
}).done(
1922
function (response) {
2023
if (response.imgSrc) {
2124
imageSource(response.imgSrc);

0 commit comments

Comments
 (0)