Skip to content

test微信小程序使用ping++支付,点击直接进入了success的回调。没有唤起支付控件,是因为测试环境的原因吗?这在测试环境下是正常的吗。。。不能模拟失败,取消的操作吗 #59

@peijunlei

Description

@peijunlei

`pingpp.createPayment(result,async function (res, err) {
// object 需是 Charge/Order/Recharge 的 JSON 字符串
// 可按需使用 alert 方法弹出 log
console.log("result:" + res);
console.log("err.msg:" + err.msg);
console.log("err.extra:" + err.extra);
if (res == "success") {
$$alert('ping++支付成功')

      console.log('success');
      
   
  
      // 只有微信JSAPI (wx_pub)、微信小程序(wx_lite)、QQ 公众号 (qpay_pub)、支付宝小程序(alipay_lite)支付成功的结果会在这里返回,其他的支付结果都会跳转到 extra 中对应的 URL
    } else if (res == "fail") {
      console.log('fail');
      $$alert('fail')
      // Ping++ 对象 object 不正确或者微信JSAPI/微信小程序/QQ公众号支付失败时会在此处返回
    

    } else if (res == "cancel") {
      console.log('cancel');
      $$alert('cancel')
      // 微信JSAPI、微信小程序、QQ 公众号、支付宝小程序支付取消支付
    }`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions