vivapayments / mobile-ios-cardterminal-interapp-sample Goto Github PK
View Code? Open in Web Editor NEWInter-App communication sample for Viva Wallet Card Terminal iOS app
Home Page: https://developer.vivawallet.com
Inter-App communication sample for Viva Wallet Card Terminal iOS app
Home Page: https://developer.vivawallet.com
I am trying to integrate Vivawallet in my ios app, but I am not able to receive a response back from VivaWallet on the outcome of the payment.
I am using the same app delegate code as the sample app:
`@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
print("Application start")
return true
}
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
print("Response URL\n:", url)
guard let components = NSURLComponents(url: url, resolvingAgainstBaseURL: true),
let path = components.path,
let params = components.queryItems else {
print("Invalid URL or path missing")
return false
}
print("Path: \(path)\nComponents: \(params)")
//MARK: - Do any additional actions after parsing the data
return true
}
func performInterAppRequest(request: String){
guard let url = URL(string: request) else { return } // url with constructed parameters
UIApplication.shared.open(url) { (result) in
print("InterApp Request URL:\n", url)
if result {
// The URL was delivered successfully!
}
}
}
}
`
I tested the app functionality both in my own app as well as in your sample app. In both cases I am able to send a payment request to the VivaWallet app, but in my own app I can never receive response back.
In your sample app, the second func application() is always called whenever I cancel the payment from the VivaWallet app and I see the response back. In my own app, after opening the VivaWallet app with performInterAppRequest, any action I perform on VivaWallet stays on the VivaWallet app and never sends response back to my own app.
Do you know what might be the problem?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.