Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <key>CFBundleURLTypes</key>
- <array>
- <dict>
- <key>CFBundleURLName</key>
- <string>com.pineapplestudio.todelete</string>
- <key>CFBundleURLSchemes</key>
- <array>
- <string>AppDemo</string>
- </array>
- </dict>
- </array>
- @IBAction func createAlipaySource(_ sender: UIButton) {
- let sourceParams = STPSourceParams.alipayParams(withAmount: 1000, currency: "usd", returnURL: "AppDemo://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