通知 电话间隙 与PayPal表格,不正确
Notification Phonegap with paypal form, is not correct
我正在尝试使用Phonegap notification
来创建确认警报,该警报显示:您确定要购买吗? 是/否。因此,如果您按"是",您将转到沙盒PayPal网络。如果按"否",则在同一页面上。
问题是我无法更改表单中的操作以调用 沙盒PayPal页面。
如果我从<form action="htpp:sandobox...">
更改,它将无法正常工作。它加载主体PayPal页面,而不是沙盒购买页面。
这是我的代码,一些帮助?
function onConfirm(button){
alert("button="+button);
if(button==2){
return false;
}else{
if(button==1){
document.form.action="https://www.sandbox.paypal.com/cgi-bin/webscr";
return true;
}
}
}
function openPaypal(){
navigator.notification.confirm(
'Pressing Yes will continue to the final part of the order, you will not be able to come back from this point.', // mensaje (message)
onConfirm, // función 'callback' a llamar con el índice del botón pulsado (confirmCallback)
'Personalised Playing Cards: Are you sure?', // titulo (title)
'Yes,Cancel' // botones (buttonLabels)
);
}
<form name="formulario" id="formulario" action="" method="post" onSubmit="return openPaypal()">
<!-- Indica que vamos a hacer una compra tipo boton comprar ahora -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Indica que no se presente un campo para notas extras -->
<input type="hidden" name="no_note" value="1">
<!-- la moneda correspondiente -->
<input type="hidden" name="currency_code" value="GBP">
<input type="image" src="../images/confirmbutton-passive.png" id="button1" style="width:100%; margin: 0px auto;" border="0" name="submit" alt="Comprar" title="Comprar">
</form>
您是否在
测试期间登录了 http://developer.paypal.com? 如果没有,您可以看到一个页面,告诉您需要先登录沙盒,然后才能使用沙盒。 但是,如果您在单独的选项卡中登录,则应按预期看到PayPal沙盒登录。
主要问题是,如果我从操作中删除 url,我无法正确加载沙盒PayPal页面,我可以实现打开沙盒PayPal但不能实现您可以看到您购买产品的页面,等等......你打开一个不同的PayPal页面,我不知道为什么!!
如果我不删除操作 url,当您按"确认表单"时,沙盒页面会直接正确打开,而不会受到通知的任何许可。
你的意思是?
谢谢
相关文章:
- Jquery菜单操作不稳定,定位不正确,存在一般错误
- Amazon S3 REST API大小不正确
- Javascript Reg Exp不正确匹配
- DIV并排,位置不正确
- 仅在IE中,javascript中的时区名称不正确
- 注意:wp_enqueue_script调用不正确.在 Wordpress 调试模式下
- 你能解释一下为什么这个javascript不正确吗
- 从int值来看,Javascript日期不正确
- jQuery-迭代不正确?(太长,无法执行)
- 字符串解析不正确
- 日历显示不正确
- 引导程序下拉列表显示不正确
- Node.js:多个然后'It’执行顺序不正确
- Highcharts热图显示不正确
- Firefox使用JQuery返回不正确的JSON
- 尝试在两次迭代中警告同一选择器的值,在第一次迭代中得到正确的值,而在第二次迭代中获得不正确的值.为什么?
- Mongoose响应解析不正确
- 格式为nnnnnnnn的字符串在电子表格中显示为日期或不正确
- 通知 电话间隙 与PayPal表格,不正确
- 信息不正确/未输入时提交的表格