Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @IBAction func createAlipaySource(_ sender: UIButton) {
- let sourceParams = STPSourceParams.alipayParams(withAmount: 1000, currency: "usd", returnURL: "PteAppDemo://stripe-redirect")
- STPAPIClient.shared().createSource(with: sourceParams) { (source, error) in
- if let error = error {
- print(error.localizedDescription)
- } else {
- if let alipayUrl = source?.redirect?.url {
- UIApplication.shared.open(alipayUrl, options: [:], completionHandler: nil)
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement