Last active
September 28, 2017 22:07
-
-
Save farhan-syed/e202dee2d75a01b1306e81a4b0d61ed4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let address = STPAddress() | |
address.line1 = "Some Street" | |
address.city = "Some City" | |
address.postalCode = "55202" | |
address.state = "CA" | |
address.country = "US" | |
address.phone = "1234567890" | |
address.email = "[email protected]" | |
address.name = "Farhan Syed" | |
let prefill = STPUserInformation() | |
prefill.billingAddress = address | |
prefill.shippingAddress = address | |
let shippingAddressViewController = STPShippingAddressViewController(configuration: STPPaymentConfiguration.shared(), theme: STPTheme.default(), currency: "USD", shippingAddress: address, selectedShippingMethod: nil, prefilledInformation: prefill) | |
shippingAddressViewController.delegate = self | |
// Present shipping address view controller | |
let navigationController = UINavigationController(rootViewController: shippingAddressViewController) | |
present(navigationController, animated: true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment