You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
714 B
26 lines
714 B
const cp_pay = function () {
|
|
var widget = new cp.CloudPayments({language: widget_data.language});
|
|
if (widget_data.widget_f == 'auth') {
|
|
widget.auth(
|
|
widget_data.data,
|
|
function (options) {
|
|
window.location.replace(widget_data.return_url);
|
|
},
|
|
function (reason, options) {
|
|
window.location.replace(widget_data.cancel_return_url);
|
|
}
|
|
);
|
|
} else {
|
|
widget.charge(
|
|
widget_data.data,
|
|
function (options) {
|
|
window.location.replace(widget_data.return_url);
|
|
},
|
|
function (reason, options) {
|
|
window.location.replace(widget_data.cancel_return_url);
|
|
}
|
|
);
|
|
}
|
|
}
|
|
|
|
window.onload = cp_pay |