Update payman.js

This commit is contained in:
Namhyeon Go 2019-10-14 01:54:13 +09:00 committed by GitHub
parent 0a8f5eec28
commit bbcc751464
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ function payman_load_widget(data) {
var check_msgs = payman_get_check_msgs();
var allows_zero = ["good_mny"];
var allows_zero = ["good_mny", "redirect_url"];
for(var k in check_msgs) {
if( !(k in data) || (allows_zero.indexOf(k) < 0 && data[k] == "") ) {
@ -30,6 +30,10 @@ function payman_load_widget(data) {
}
}
if("redirect_url" in data) {
req_data['redirect_url'] = data['redirect_url'];
}
if(is_available == true) {
$.ajax({
type: "post",
@ -83,3 +87,21 @@ function payman_submit() {
$("#payman_orderform").submit();
return true;
}
function payman_submit_nw() {
var check_msgs = payman_get_check_msgs();
for(var k in check_msgs) {
if(payman_get_data(k) == "") {
alert(check_msgs[k]);
return false;
}
}
var $obj = $("#payman_orderform");
var nw = window.open("", "payman_window", "height=600,width=786,modal=yes,alwaysRaised=yes");
$obj.attr("target", "payman_window");
$obj.submit();
nw.focus();
return true;
}