newebpay-mpg-sdk
Version:
藍新金流 幕前支付(MPG) SDK
21 lines (20 loc) • 650 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSuccessResponse = exports.is3DResponse = void 0;
function is3DResponse(response) {
if (typeof response === "string") {
return true;
}
return (response.Status === "SUCCESS" &&
typeof response.Result === "string");
}
exports.is3DResponse = is3DResponse;
function isSuccessResponse(response) {
if (typeof response === "string") {
return false;
}
return (response.Status === "SUCCESS" &&
typeof response.Result === "object" &&
response.Result !== null);
}
exports.isSuccessResponse = isSuccessResponse;