#jin_api

1 messages ยท Page 1 of 1 (latest)

verbal cloudBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1318682645181366332

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

bold geodeBOT
novel obsidian
#

Hi there ๐Ÿ‘‹ can you clarify whether you've completed steps up to Step 4, or if you've completed Step 4 as well? Since Step 4 is adding the necessary capability.

terse forum
#

yes step4 is completed

terse forum
terse forum
# terse forum

step 1 is completed right? since I can complete payment with credit card

novel obsidian
#

Ok, in that case, do you have Apple Pay setup on the device you're using for testing, and already have a card in that Apple Pay wallet?

terse forum
#

yes I have apple pay set up on the device. there's a card in that Apple Pay wallet

#

i am using testing mode though

novel obsidian
#

If you're in testmode, that just means we'll swap whatever card is actually in your wallet for our 4242 test card behind the scenes, but we still check that there is a card to simulate livemode behavior.

terse forum
terse forum
terse forum
terse forum
novel obsidian
#

Are we looking at the same guide? Step 2 in the guide you shared is to register for an Apple Merchant ID

terse forum
#

sorry typo

#

its step1

novel obsidian
#

Sorry, I don't understand what you're describing. Did you add StripeApplePay to your AppDelegate.swift file, or did you skip editing that file?

terse forum
novel obsidian
#

Sounds like you aren't importing the necessary packages then to me.

If you don't have a .swift file, does that mean you're using Objective C for your app?

terse forum
#

i am using SwiftUI

#

I have .swift files. I just don't have the AppDelegate.swift file

novel obsidian
#

What are you using for package management?

terse forum
terse forum
novel obsidian
terse forum
#

i don't get what you mean?

#

I just added a AppDelegate.swift file like below to my project. Apple Pay still not showing up

novel obsidian
#

Step 1 of the guide is about importing our necessary package into your app/project. If you aren't using Swift Package Manager, then you need to import that library for the package manager you're using. That's why we have 4 tabs in that section for different package management solutions.

#

I'm not intimately familiar with iOS, so I'm not sure what package manager you provided a link to the documentation for earlier.

verbal cloudBOT
terse forum
#

oh ok. So I am using Swift Package Manager

#

StripeApplePay is already imported into my project using Swift Package Manager

#

Apple Pay still not showing up though

novel obsidian
#

I'm a little confused, because my understanding is you would have had an AppDelegate.swift field present in your project if you were using the Swift Package Manager.

terse forum
#

Maybe I didn't have a AppDelegate.swift initially because I used SwiftUI (not Swift), even though I used Swift Package Manager.

#

I have to manually add AppDelegate.swift when using SwiftUI. Not the case with Swift

frozen hound
#

๐Ÿ‘‹ stepping in for my teammate. I'm also not too familiar with iOS so give me a few minutes to loop in someone else

terse forum
#

okie thanks

eager grove
terse forum
#

I am using Stripe PaymentSheet so I didn't do anything step 5 and onwards

eager grove
#

Okay and are you logging the results of this function to check if Apple Pay is supported?

StripeAPI.deviceSupportsApplePay()
terse forum
eager grove
#

Okay nice.

terse forum
eager grove
#

Specifically I'm wondering if you updated the PaymentSheet configuration like we show here

var configuration = PaymentSheet.Configuration()
configuration.applePay = .init(
  merchantId: "merchant.com.your_app_name",
  merchantCountryCode: "US"
)
terse forum
eager grove
#

Woohoo! ๐ŸŽ‰

terse forum
#

nice thanks