Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.82 KB | None | 0 0
  1. <key>CFBundleURLTypes</key>
  2.     <array>
  3.         <dict>
  4.             <key>CFBundleURLName</key>
  5.             <string>com.pineapplestudio.todelete</string>
  6.             <key>CFBundleURLSchemes</key>
  7.             <array>
  8.                 <string>AppDemo</string>
  9.             </array>
  10.         </dict>
  11.     </array>
  12.  
  13.  
  14.  @IBAction func createAlipaySource(_ sender: UIButton) {
  15.         let sourceParams = STPSourceParams.alipayParams(withAmount: 1000, currency: "usd", returnURL: "AppDemo://stripe-redirect")
  16.         STPAPIClient.shared().createSource(with: sourceParams) { (source, error) in
  17.             if let error = error {
  18.                 print(error.localizedDescription)
  19.             } else {
  20.                 if let alipayUrl = source?.redirect?.url {
  21.                     UIApplication.shared.open(alipayUrl, options: [:], completionHandler: nil)
  22.                 }
  23.             }
  24.         }
  25.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement