Skip to content

Commit

Permalink
Merge pull request #16 from Tj3n/master
Browse files Browse the repository at this point in the history
Update 3.1.1: PWCoreSDK, PWAlipayPlugin, PWWechatpayPlugin
  • Loading branch information
kenhaios authored Jun 18, 2020
2 parents d386c6f + 6e8cabd commit 6565af7
Show file tree
Hide file tree
Showing 31 changed files with 884 additions and 511 deletions.
5 changes: 5 additions & 0 deletions Core SDK/Headers/PWCoreSDKMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ NS_ASSUME_NONNULL_BEGIN
*/
-(void)handlePingbackURL:(NSURL *)url;

/// Using for handle callback from local payment option app if using universal link (eg. Wechatpay)
/// Put in AppDelegate's application:continueUserActivity:restorationHandler:
/// @param userActivity NSUserActivity
-(BOOL)handlePingbackUniversalLink:(NSUserActivity *)userActivity;

#pragma mark - Optional
/**
Some payment option will require signing the request to continue payment. You can call this method after you signed the `stringToSign` inside the `PWCoreSDKDelegate` callback with the appropriated signing algorithm and your secret key
Expand Down
Binary file modified Core SDK/libPWCoreSDK.a
Binary file not shown.
2 changes: 1 addition & 1 deletion PWAlipayPlugin.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Pod::Spec.new do |s|
s.name = "PWAlipayPlugin"
s.version = "3.1.0"
s.version = "3.1.1"
s.summary = "PWAlipayPlugin"
s.description = "Plugin for Alipay payment option for PWCoreSDK"
s.homepage = "http://paymentwall.com"
Expand Down
10 changes: 8 additions & 2 deletions PWCoreSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Pod::Spec.new do |s|
s.name = "PWCoreSDK"
s.version = "3.1.0"
s.version = "3.1.1"
s.summary = "PWCoreSDK"
s.description = "Unified SDK for all paymentwall products on iOS"
s.homepage = "http://paymentwall.com"
Expand All @@ -11,12 +11,18 @@ Pod::Spec.new do |s|
s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
s.requires_arc = true

s.source = { :git => "https://github.com/paymentwall/paymentwall-ios-sdk-master.git", :tag => 'v'+String(s.version) }
s.source = { :git => "https://github.com/paymentwall/paymentwall-ios-sdk-master.git", :tag => "v"+String(s.version) }

s.public_header_files = "Core SDK/**/PWCoreSDK.h"
s.source_files = "Core SDK/**/PWCoreSDK.h"
s.resources = "Core SDK/*.bundle", "Core SDK/PWCoreSDKResource.bundle"
s.vendored_libraries = "Core SDK/libPWCoreSDK.a"

s.subspec 'CoreSDK' do |sp|
sp.source_files = "Core SDK/**/*.{h,m}"
end

s.pod_target_xcconfig = {
"OTHER_LDFLAGS" => "-lObjC"
}
end
2 changes: 1 addition & 1 deletion PWWechatpayPlugin.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Pod::Spec.new do |s|
s.name = "PWWechatpayPlugin"
s.version = "3.0.0"
s.version = "3.1.1"
s.summary = "PWWechatpayPlugin"
s.description = "Plugin for Wechatpay payment option for PWCoreSDK"
s.homepage = "http://paymentwall.com"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Plugins/PWAlipayPlugin/AlipaySDK.bundle/bridge.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Plugins/PWAlipayPlugin/AlipaySDK.framework/AlipaySDK
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//
// AFServiceCenter.h
// AFServiceSDK
//
// Created by jiajunchen on 02/01/2018.
// Copyright © 2018 antfin. All rights reserved.
//

#import <Foundation/Foundation.h>

@class AFServiceResponse;

/**
SDK支持的业务枚举值
- AFServiceEInvoice: 电子发票
- AFServiceAuth: 账户授权
*/
typedef NS_ENUM(NSUInteger, AFService) {
AFServiceEInvoice,
AFServiceAuth,
AFServiceDeduct
};


extern NSString * const kAFServiceOptionBizParams; // 钱包服务调用入参
extern NSString * const kAFServiceOptionCallbackScheme; // 业务回跳当前app的scheme
extern NSString * const kAFServiceOptionNotUseLanding; // 不使用支付宝提示下载页做补偿,为true时需要商户自己处理用户未安装支付宝的情况
extern NSString * const kAFServiceBizParamsKeyUrl; // 独立签约入参url

typedef void(^AFServiceResultBlock)(AFServiceResponse *response);

@interface AFServiceCenter : NSObject

/**
调用钱包服务
@param service 业务service, 见AFService枚举值
@param params 参数Dictionary, key值详情参见kAFServiceOptionBizParams、kAFServiceOptionCallbackScheme注释
@param block 业务结果回调的block, block参数是AFServiceResponse类型,业务结果通过result属性获取,如果未用户未安装支付宝并且kAFServiceOptionNotUseLanding未设置为true,会使用H5landing页做补偿,这种情况下不会有block回调结果。
*/
+ (void)callService:(AFService)service
withParams:(NSDictionary *)params
andCompletion:(AFServiceResultBlock)block;


/**
处理钱包服务回跳APP的URL
@param url 回跳URL
@param block 业务结果回掉的block,详情见调用接口入参上的block。注意此接口上的block只有在跳转钱包后,当前APP被系统回收的情况下回跳才生效
*/
+ (void)handleResponseURL:(NSURL *)url
withCompletion:(AFServiceResultBlock)block;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// AFServiceResponse.h
// AFServiceSDK
//
// Created by jiajunchen on 08/01/2018.
// Copyright © 2018 antfin. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
钱包服务调用结果状态吗
- AFResSuccess: 默认值,业务调用成功,结果数据参见result字段
- AFResInvalidService: service枚举值错误
- AFResInvalidURL: 钱包回跳URL错误
- AFResRepeatCall: 业务重复调用(3s内)
- AFResOpenURLErr: 跳转失败
*/
typedef NS_ENUM(NSUInteger, AFResCode) {
AFResSuccess = 0,
AFResInvalidService = 100,
AFResInvalidURL,
AFResRepeatCall,
AFResOpenURLErr,
};


@interface AFServiceResponse : NSObject


/**
业务调用状态吗
*/
@property (nonatomic, assign) AFResCode responseCode;


/**
业务结果Dictionary, 内容请参考具体业务方接入文档
*/
@property (readonly) NSDictionary *result;

@end
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//
// APAuthInfo.h
// AliSDKDemo
// APAuth
//
// Created by alipay on 16-12-12.
// Copyright (c) 2016年 Alipay.com. All rights reserved.
// Created by antfin on 17-10-24.
// Copyright (c) 2017年 AntFin. All rights reserved.
//

#import <Foundation/Foundation.h>
Expand Down
Loading

0 comments on commit 6565af7

Please sign in to comment.