Closed garciajordy closed 3 years ago
On the latest version of Solidus you should pass the success and error functions as parameters.
A solution would be: from
Spree.ajax({ method: "POST", url: "/solidus_afterpay/checkouts.json", data: { order_number: orderNumber, payment_method_id: paymentMethodId, }, }) .success(function (response) { onSuccess(response); }) .error(function (response) { onError(response); });
to
Spree.ajax({ method: "POST", url: "/solidus_afterpay/checkouts.json", data: { order_number: orderNumber, payment_method_id: paymentMethodId, }, success: function (response) { onSuccess(response); }, error: function (response) { onError(response); } });
The only question left is: Would this also work for older versions of solidus?
Yes, the new syntax will work with jQuery 1 👍
Express checkout JS callbacks are still using the old version on JQuery syntax
On the latest version of Solidus you should pass the success and error functions as parameters.
A solution would be: from
to
The only question left is: Would this also work for older versions of solidus?