通知 电话间隙 与PayPal表格,不正确

Notification Phonegap with paypal form, is not correct

本文关键字:表格 不正确 PayPal 电话 电话间 间隙 通知      更新时间:2023-09-26

我正在尝试使用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,当您按"确认表单"时,沙盒页面会直接正确打开,而不会受到通知的任何许可。

你的意思是?

谢谢