我想用paysbuy
SDK实现支付功能......问题是它没有任何cancel
选项,以便用户可以在支付成功后取消关闭操作。
默认情况下,SDK提供了一种打开WebView
覆盖整个屏幕部分的默认方法..并且没有任何cancel
选项..
我只想cancel
通过加载特定的付款来添加一个按钮view
..viewcontroller
或..我尝试在视图中使用container
..加载视图内的container
视图和视图cancel
外的按钮container
,但是当我尝试这个过程时,它显示为默认全屏WebView
。也尝试创建PopUP
但没有成功
那么,如何在我的特定部分加载webview
of ,以便我可以放置一个按钮?SDK
view
Cancel
这是sdk提供的启动服务的方法
- (void) callServiceWithCurrentView :(UIViewController *) currentViewController
invoice:(NSString *)invoice
item:(NSString *)item
amount:(NSString *)amount
paypal_amount:(NSString *)paypal_amount
transferMethod:(NSString *)transferMethod
customerLanguage:(NSString *)customerLanguage
operator_name:(NSString *)operator_name
operator_email:(NSString *)operator_email
operator_mobile:(NSString *)operator_mobile
operator_address:(NSString *)operator_address
operator_detail:(NSString *)operator_detail;
在这里,我们可以看到该callServiceWithCurrentView
方法显示了目标, currentviewcontroller
因此我认为它默认以...的full screen
模式加载。viewcontroller
这是我在swift中实现的方式
paysBuy?.callServiceWithCurrentView(self, invoice: "343434343", item: "App Fee", amount: "10", paypal_amount: "1", transferMethod: "1", customerLanguage: "E", operator_name: "PAYSBUY", operator_email: "abc@paysbuy.com", operator_mobile: "0888888888", operator_address: "PAYSBUY.COM", operator_detail: "PAYMENT")
以及在成功或失败的情况下处理响应的委托方法
extension PaysBuyHelper:PaysbuySDKDelegate{
func responseWithResult(result: String!, andInvoice invoice: String!) {
//here is the response of the payement
println(result)
println(invoice)
if result == "00" {
println("transaction complete and below is the invoice number")
println(invoice)
}else if result == "90"{
println("transaction incomplete information")
}
}
}
这是我所做的工作...... https://drive.google.com/file/d/0Bzk4QVQhnqKmVno5NGdPUV9ITkE/view?usp=sharing