32 lines
1.6 KiB
Markdown
32 lines
1.6 KiB
Markdown
# PaymentSheet Example App
|
|
|
|
PaymentSheet is a pre-built UI that combines all the steps required to accept payment - collecting payment information, billing details, and confirming the payment - into a single sheet that displays on top of your app.
|
|
|
|
### Features
|
|
- Supports 10+ payment methods
|
|
- Card scanning
|
|
- Light and dark mode
|
|
- Helps you stay PCI compliant
|
|
|
|
<p align="center">
|
|
<img src="https://user-images.githubusercontent.com/89988962/153276097-9b3369a0-e732-45c4-96ec-ff9d48ad0fb6.png" width="480" alt="PaymentSheet Example App" align="center">
|
|
</p>
|
|
|
|
### To run the app
|
|
1. Open `Stripe.xcworkspace` in Xcode
|
|
2. Choose the **PaymentSheet Example** target in the top left
|
|
3. Choose any simulator and click Run
|
|
|
|
The example app will appear with buttons that show different view controllers in this project.
|
|
|
|
The view controllers correspond to different ways to integrate PaymentSheet into your app.
|
|
|
|
### UIKit
|
|
- `ExampleCheckoutViewController.swift`: ["one-step" integration](https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet&uikit-swiftui=uikit)
|
|
- `ExampleCustomCheckoutViewController.swift`: ["multi-step" integration](https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet-custom&uikit-swiftui=uikit)
|
|
|
|
### SwiftUI
|
|
- `ExampleSwiftUIPaymentSheet.swift`: ["one-step" integration](https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet&uikit-swiftui=swiftui)
|
|
- `ExampleSwiftUICustomPaymentFlow.swift`: ["multi-step" integration](https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet-custom&uikit-swiftui=swiftui)
|
|
|