Follow on Google News News By Tag Industry News News By Location Country(s) Industry News
Follow on Google News | Integrating Apple Pay into iOS App: Quick StepsBy: sphinx solutions To create a Merchant ID, start by generating an App ID. Head over to developer.apple.com and log in to your developer account. Next, access the "Certificates, Identifiers, & Profiles" section and proceed to the Identifier tab, where you should choose the App ID option. Ensure you check the Apple Pay box, then click Continue and follow the prompts to complete the App ID creation process, which is essential for managing iOS device IDs effectively. Set up apple pay capabilities in Xcode Once you have made your Merchant ID, you need to open your project in the Xcode & select Capabilities. Now turn Apple Pay on & add your Merchant ID and refresh the page. Once you have done it, on the developer portal, a Merchant ID list will be visible. Make a sandbox user in iTunes connect You're almost in the middle stage of the Apple Pay implementation process. After completing the above steps successfully, you need to make a Gmail account. For this, go to itunesconnect.apple.com & select the "Users and Roles" option. Add a test card In this step, you have to modify your iPhone region. All you need to do is logout from the current iCloud account & login with the sandbox user details. Now, you have to add a test card, for instance:
Next, you have to make a proper payment request for the project. For this, you can add any kind of button from a storyboard to a ViewController. After that, you need to connect IBAction with ViewController.swift. For effectively using Apple Pay, properly add Import PassKit to the ViewController. Once you have inserted it, set up a payment request for the purchaseItem. @IBAction func purchaseItem(_ let request = PKPaymentRequest() request.merchantIdentifier = "merchant.net.mobindustry.likeMe" request.supportedNetworks = [PKPaymentNetwork.visa, PKPaymentNetwork.masterCard, PKPaymentNetwork.amex] request.merchantCapabilities = PKMerchantCapability.capability3DS request.countryCode = "US" request.currencyCode = "USD" request.paymentSummaryItems = [ PKPaymentSummaryItem( ] let applePayController = PKPaymentAuthorizationViewController( self.present( } Step 6: Manage the output You have to insert "applePayController? extension PaymentViewController: PKPaymentAuthorizationViewControllerDelegate{ func paymentAuthorizationViewControllerDidFinish(_ controller.dismiss( } func paymentAuthorizationViewController(_ completion(PKPaymentAuthorizationResult( } } https://www.sphinx- End
Account Email Address Account Phone Number Disclaimer Report Abuse
|
|