Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

payId 7FC0zop3tqqKlgu2Nzdj1DYsTqZnxhGu does not exist #21

Open
qazujmko opened this issue May 15, 2018 · 29 comments
Open

payId 7FC0zop3tqqKlgu2Nzdj1DYsTqZnxhGu does not exist #21

qazujmko opened this issue May 15, 2018 · 29 comments

Comments

@qazujmko
Copy link

使用的测试网络,已更新至0.1.0

@yupnano
Copy link
Contributor

yupnano commented May 15, 2018

可以贴一下代码吗?可能是哪里不小心写错了。

@qazujmko
Copy link
Author

删了额,我还是用getTransactionReceipt吧

@oppfx
Copy link

oppfx commented May 16, 2018

官方示例,也是报一样的错误,执行pay后,下面刷新还是报{"code":1,"data":{},"msg":"payId 44CzBKzqd1fCQQi6ICivW6bfNdkbz2EH does not exist"}

@yupnano
Copy link
Contributor

yupnano commented May 16, 2018

@oppfx 是指的那个示例呢? 是本repo下的 examples/example.html 吗?

@oppfx
Copy link

oppfx commented May 19, 2018

@yupnano 是的

@yupnano
Copy link
Contributor

yupnano commented May 19, 2018

刚试了一下,这个例子没问题的,注意选择相应的网络。
qq 20180519161601

@oppfx
Copy link

oppfx commented May 21, 2018

11 2x

什么问题导致的,

@oppfx
Copy link

oppfx commented May 21, 2018

@yupnano 你Q多少

@yupnano
Copy link
Contributor

yupnano commented May 21, 2018

多点击几次“refreash”试试,交易上链需要10多秒的时间。

@roc198
Copy link

roc198 commented May 25, 2018

手动查询已经成功的交易,通过queryPayInfo查询结果始终是不存在

@yupnano
Copy link
Contributor

yupnano commented May 26, 2018

@roc198 可以贴一下已经成功的那条交易对应的serialNumber吗? 我来查一下试试

@roc198
Copy link

roc198 commented May 27, 2018

@yupnano CWTqxCy9h3nFZoDYh5gpICRp2YEf0zrh, mainnet

@yupnano
Copy link
Contributor

yupnano commented May 27, 2018

@roc198 pull新的代码后运行gulp指令了吗?
这个serialNumber在主网和测试网查询你服务器都没记录,是因为没发送上去,应该是nebpay.js文件没重新生成。你看一下浏览器控制台有没有相关错误。

@roc198
Copy link

roc198 commented May 27, 2018 via email

@yupnano
Copy link
Contributor

yupnano commented May 29, 2018

根据目前的信息还不能确定原因,只知道这个serialNumber并没有传到查询服务器。

@roc198
Copy link

roc198 commented May 29, 2018 via email

@yupnano
Copy link
Contributor

yupnano commented May 29, 2018

不介意的话可以用teamviewer远程协助一下.

@roc198
Copy link

roc198 commented May 29, 2018 via email

@roc198
Copy link

roc198 commented May 29, 2018 via email

@YanYuanFE
Copy link

我也遇到了,交易都成功了,但是一直说不存在

@YanYuanFE
Copy link

payId手动在哪查

@yupnano
Copy link
Contributor

yupnano commented Jun 2, 2018

@YanYuanFE 先更新一下浏览器插件再试试,很可能是插件版本太低了。

By the way,here is the link for querying tx result.
Just replace the payId to your SerialNumber

@KunPengRen
Copy link

主网测试时 吧nebPay.js 中
var payUrl = "https://pay.nebulas.io/api/pay";改为
var payUrl = "https://pay.nebulas.io/api/mainnet/pay";
就行了

@udbmnm
Copy link

udbmnm commented Jun 10, 2018

queryPayInfo的bug,还准备提pr发现已经修复了

@dantegg
Copy link

dantegg commented Jun 14, 2018

0.2.0 的queryPayInfo还是会报payId not exists的错啊
将callback显式设置成mainnetUrl就OK了

@kapinars
Copy link

Still facing the same issue.

@yupnano
Copy link
Contributor

yupnano commented Jun 17, 2018

@arsinator please paste your code here, the code that using nebpay.call and nebpay.queryPayInfo

@kapinars
Copy link

kapinars commented Jun 17, 2018

I added to nebPay.call options callback: NebPay.config.mainnetUrl , and it start work, but incorrectly.

If i remove callback: NebPay.config.mainnetUrl, the result will be tx result: {"code":1,"data":{},"msg":"payId Qb6Mx1vqZm3tErQXQlgnPCT2Ttpy3cXd does not exist"} ,

No matter of what tx result code is always 0
tx result: {"code":0,"data":{"execute_error":"","gas_price":"1000000","data":"eyJGdW5jdGlvbiI6InRlc3QiLCJBcmdzIjoiIn0=","gas_used":"","contract_address":"","type":"call","nonce":16,"gas_limit":"200000","chainId":1,"from":"n1HfBr2rJn6NDnF4RRSB7KRo787CPfqDNsX","to":"n1xbsmJVpCdAQNNeRxWJirfZFWKzbMWQVG2","execute_result":"","value":"0","hash":"922a10761f60f77e902e96fd0c85525fed344e440e35eea8ae395e1848c28674","status":2,"timestamp":1529237376},"msg":"success"}

and after 30 seconds it begins working fine

tx result: {"code":0,"data":{"execute_error":"","gas_price":"1000000","data":"eyJGdW5jdGlvbiI6InRlc3QiLCJBcmdzIjoiIn0=","gas_used":"20123","contract_address":"","type":"call","nonce":16,"gas_limit":"200000","chainId":1,"from":"n1HfBr2rJn6NDnF4RRSB7KRo787CPfqDNsX","to":"n1xbsmJVpCdAQNNeRxWJirfZFWKzbMWQVG2","execute_result":"\"Sun, 17 Jun 2018 12:10:00 GMT\"","value":"0","hash":"922a10761f60f77e902e96fd0c85525fed344e440e35eea8ae395e1848c28674","status":1,"timestamp":1529237376},"msg":"success"}

It would be better if in first tx result code will be equal -1.

My code.

    function onButtonClick() {        
        // var to = dappAddress; 
        var to = "n1xbsmJVpCdAQNNeRxWJirfZFWKzbMWQVG2" ;  //the smart contract address of your Dapp
        var value = "0";
        var callFunction = "test" //the function name to be called
        var callArgs =  ""  //the parameter, it's format JSON string of parameter arrays, such as'["arg"]','["arg1","arg2]'        
        var options = {
            goods: {        //commodity description
                name: "example"
            },
            callback: NebPay.config.mainnetUrl
        }
        
        //Send transaction (here is smart contract call)
        serialNumber = nebPay.call(to, value, callFunction, callArgs, options);
        
        //Set a periodically query
        intervalQuery = setInterval(function() {
            funcIntervalQuery();
        }, 10000); //it's recommended that the query frequency is between 10-15s.
    }
    
    //Query the result of the transaction. queryPayInfo returns a Promise object.
    function funcIntervalQuery() {   
        nebPay.queryPayInfo(serialNumber)   //search transaction result from server (result upload to server by app)
            .then(function (resp) {
                console.log("tx result: " + resp)   //resp is a JSON string
                var respObject = JSON.parse(resp);
                if(respObject.code === 0){
                    //The transaction is successful 
                    
                    clearInterval(intervalQuery)    //stop the periodically query 
                }
            })
            .catch(function (err) {
                console.log(err);
            });
    }

Or maybe {status:2} shows that queryPayInfo is not ready and i must wait for {status:1} ?

@yupnano
Copy link
Contributor

yupnano commented Jun 18, 2018

@arsinator you should use the status in the transaction receipt info: 0 failed, 1 success, 2 pending.

image


and by the way, you should also use options argument for queryPayInfo
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants