GithubHelp home page GithubHelp logo

Comments (7)

samurai00 avatar samurai00 commented on August 17, 2024 1

@Mr-nan 2.2.29 版本,微信官方的 SDK 有变动。“微信支付支持 Universal Links 方式跳转”
必须使用 Universal Links。微信快要废弃原来的方法了。如果非要用原来的 URL Schemes 方式(当前微信还没废弃,但是建议适配 Universal Links),就不要在 Podfile 包含 Pingpp/Wx。

Universal Links 配置方法请参考 Apple 官方文档微信相关文档

回调也不是原来的了,都是 Universal Links 相关的

// 微信使用 Universal Links 的情况,需要该方法
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
    var ret = Pingpp.handleContinue(userActivity, withCompletion: nil)
    if !ret {
        // 其他逻辑
        // ret = 其他处理
    }

    return ret
}

如果还不行,那你需要提供详细的信息。

  1. 支付完成或者取消是按的微信上哪一个按钮?“返回商家”?还是其他按钮?
  2. 是否跳回至你自己的 app?如果没回去,那肯定是哪里没配置对,不需要往下看了。
  3. 进入了 appdelegate 哪个方法?打印一下 URL,是什么内容?(只要不是按的最左上角的"< 你的app名字",都会调用到 application open url 的方法,按了那个是没办法拿到回调的)
  4. 调用了 Pingpp 的 handleOpen 了吗?返回什么?是不是在调用 Pingpp 的方法前就已经 return 了?
  5. 调用 Pingpp 的 handleOpen 第二个参数有没有传?传了 completion 还是 nil
  6. 如果传了 nil,那么会在 createPayment 方法里传的 completion 回调,除非那个实例已被你销毁
  7. 如果传了 completion 那么会在这里返回,createPayment 方法里传的 completion 是不会有回调的,这个逻辑一直都是这样的。

你要确认是不是稍微改了一下部分相关的调用?

from pingpp-ios.

samurai00 avatar samurai00 commented on August 17, 2024

URL Scheme

URL Scheme 配置了吗

from pingpp-ios.

cleven1 avatar cleven1 commented on August 17, 2024

配置了

from pingpp-ios.

Mr-nan avatar Mr-nan commented on August 17, 2024

我也遇到改问题,回调方法不响应

from pingpp-ios.

samurai00 avatar samurai00 commented on August 17, 2024

微信 app 支付,URL Schemes 一定要有一个是微信的 appid(是微信的 "wx" 开头的),否则是跳不回来的。而且必须是你支付的那一个 appid,换任何其他的都不行。

回调方法不响应。先确认回调的 URL 是什么,handleOpenURL 方法掉了吗,返回什么,YES/true 还是 NO/false?
completion 有没有覆盖掉

from pingpp-ios.

Mr-nan avatar Mr-nan commented on August 17, 2024

@samurai00 之前用的版本是2.2.22微信回调都正常,更新至2.2.29版本后回调就没有响应;已检查URL Schemes都一样;

from pingpp-ios.

szuwest avatar szuwest commented on August 17, 2024

请问解决了吗?

from pingpp-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.