I want to implement payment functionality with paysbuy
SDK....The problem is it doesnot have any cancel
option on it so that user can cancel the operation of close after the payment has been successful.
By default SDK provides a method that opens the default WebView
that covers the whole part of the screen..And there is no any cancel
option..
I just want to add a cancel
button by load the payment on the specific view
..or viewcontroller
..I tried using in container
view..to load the view inside the container
view and a cancel
button outside the container
view ,but when i try this process,it shows by default in Full Screen WebView
.Also tried creating a PopUP
but didnot succeed
So, how can i load the webview
of SDK
on a specific portion of my view
so that i can put a Cancel
button??
This is the method that the sdk provides to start the service
- (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;
Here we can see the callServiceWithCurrentView
method shows the target as currentviewcontroller
so i think it loads by default in full screen
mode on the viewcontroller
....
Here is how i implemented in swift
paysBuy?.callServiceWithCurrentView(self, invoice: "343434343", item: "App Fee", amount: "10", paypal_amount: "1", transferMethod: "1", customerLanguage: "E", operator_name: "PAYSBUY", operator_email: "[email protected]", operator_mobile: "0888888888", operator_address: "PAYSBUY.COM", operator_detail: "PAYMENT")
And a delegate method that handles the response in case of success or failutre
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")
}
}
}
Here is the work that i have done.... https://drive.google.com/file/d/0Bzk4QVQhnqKmVno5NGdPUV9ITkE/view?usp=sharing