zoukankan      html  css  js  c++  java
  • 支付宝回调

    支付宝回调监控,支付宝客户端和网页支付宝回调方式不一样

     

    支付宝客户端回调会在AppDelegate里面:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options{
        //支付宝支付
        if ([url.host isEqualToString:@"safepay"]) {
            [[AlipaySDK defaultService] processOrderWithPaymentResult:url standbyCallback:^(NSDictionary *resultDic) {
                //利用代理监听支付宝回调,
                if (_alipayDelegate && [_alipayDelegate respondsToSelector:@selector(getAlipayPayResult:)]) {
                    [_alipayDelegate getAlipayPayResult:resultDic];
                }
                //充值回调
                if (_alipayRechargeDelegate && [_alipayRechargeDelegate respondsToSelector:@selector(getAlipayRechargeResult:)]){
                    [_alipayRechargeDelegate getAlipayRechargeResult:resultDic];
                }
            }];
            return YES;
        }

     网页支付宝回调在调起支付宝支付时:

    1
    2
    3
    4
    [[AlipaySDK defaultService] payOrder:orderString fromScheme:@"应用程序shemes" callback:^(NSDictionary *resultDic) {
                   //没有安装支付宝,网页支付宝回调
                   [self handleAlipayWith:resultDic];
               }];
  • 相关阅读:
    PHP时间操作
    php实用正则
    PHP正则表达式函数
    PHP常用字符串函数
    PHP数组简单操作
    PHP基础-自定义函数-变量范围-函数参数传递
    PHP常量的定义和用法
    Ajax用法
    DBCP连接池和事物
    ltp-ddt emmc_dd_rw
  • 原文地址:https://www.cnblogs.com/LynnAIQ/p/6377303.html
Copyright © 2011-2022 走看看