hpar so the script should be imported and have the variable defined inside the return() ?
cweiss has quit
hpar
I'm really not sure what you're doing WhitKennedy, can you share some code that's erroring? Officially you should be loading Stripe from a script tag
timebox
lemony312: No, they can't - the email is unique.
hpar
lord_florf: I believe you can send EMV data to Stripe somehow but I'm unclear on the details; worth writing to support about! https://support.stripe.com/email/login
lord_florf
Thanks @hpar
WhitKennedy
We are loading the script in our DOM. Console is saying that window.stripe is not a function.
@hpar
hpar
it's window.Stripe
WhitKennedy
we are doing window.Stripe
koopajah has quit
full line is "const stripe = window.Stripe(apikey);"
hpar
are you loading v2 or v3? are you certain that the script is loaded before your code runs?
Hi everyone. Having trouble getting the card element to load on my page. I'm following the first example given on the Elements example page, but it doesn't seem to want to load. I can see the iframe and input in the HTML, but they aren't showing.
All of the JS that you provide you can see if you can access that link.
WhitKennedy
We're going to try loading the API locally
dopesong joined the channel
hpar
Stripe.js won't function correctly when loaded locally, it has to be loaded from a Stripe domain
I'd try inspecting window.Stripe from your console after your app's loaded, I suspect that your code is running before Stripe.js is loaded for some reason
stripe414 has quit
dopesong joined the channel
WhitKennedy
In console it says that Stripe is loading correctly. So I believe its there but it must be loading async and thus loaded after our payments.js has initialized? thanks for the help, we're going tt continue testing
lord_florf has quit
hmichals has quit
timebox
bhorbal: Yup, can see that. It might be a CSS/layout thing; what happens if you just throw the `card-element` somewhere else? Does it show up?
Dev0n
hey, there is still no api endpoint to delete test data right?
BCApolloLC: so webfonts are currently being worked on, there's only a fragile way to implement them right now so I'd recommend holding off a few weeks for custom fonts if you can
justdl joined the channel
AndyPala joined the channel
bhorbal
timebox: Hmm, when I moved it, it showed up. Do you think it is CSS that I added that might be hiding it for some reason? I have it as a flex item in a flexbox. Does it do okay in flexbox?
otymartin joined the channel
otymartin
question, when I create or update a stripe customer with card details, how do I know the card they entered is either Credit or Debit?
bhorbal
timebox: Ahh, it was my CSS. Thanks for the tip!
BCApolloLC
thanks hpar
deadghost_ has quit
WhitKennedy
so I guess we need to run our own node.js server
AndyPala
Hi, I'm trying to customize the Elements css, I'm using element.create('cardNumber',{ style:{base: {textAlign:'center'} } }) but I'm getting an error (Unrecognized property: textAlign is not a customizable CSS property.)
davic joined the channel
otymartin has quit
lemony312 has quit
ftknox_ joined the channel
AndyPala has quit
ftknox has quit
onkora joined the channel
onkora
Hi!
I have a question about receipt emails
timebox
onkora: Hi! What's up>
?
onkora
I want to build my own custom email, and I'd like to have a receipt_number
but as I understand it that's only generated if I send using the dashboard
is there another way?
air_ joined the channel
timebox
onkora: It's only generated when we email out receipts, but you can pretty much use anything you want - whatever makes sense for your application.
dqsf joined the channel
wilsonreuben joined the channel
davi-lima has quit
allibubba joined the channel
justin_ joined the channel
ftknox_ has quit
lewis has quit
justin_
Is it possible to update sources directly from iOS without going through my backend? It seems like it should be since CustomerContext (using the ephemeral key) and PaymentContext do upload cards to the customer object.
hpar
iOS at least needs to reach out to your backend to get the ephemeral key
but yeah, with that, the latest version of the SDK can update a customer's cards directly
justin_
Right, it is doing that, but with which class can you upload directly?
onkora
hm, I'm a little bit time crunched, is there a way to generate a receipt but not send it?
justin_
I don't want to use the Payment context because I am simply collecting card information and not actually creating transactions or anything like that.
timebox
onkora: Unfortunately there is not, but you could use any string/number you wanted as a receipt number in your custom receipt - and you could store it in the Charge's metadata for cross-reference: https://stripe.com/docs/api#metadata
justin_
@hpar: thanks for always being quick to respond by the way.
hpar
justin_: I think you should be able to use the PaymentMethodsVC but I'm not clear how it works with the new customercontext stuff
jim_layhee has quit
justin_
Yeah I might just have to keep looking into it. I tried the PaymentMethodsVC but it has some undesired behavior for the app
Gsham joined the channel
hpar
you can also use paymentcontext but just not use the requestpayment part
justin_
Right but there doesnt seem to exist a method to upload a card with that
hpar
what do you mean by "upload a card"? it will show the customer their current list of cards
wilsonreuben joined the channel
wilsonreuben has quit
justin_
@hpar: I mean I want to add a card to the stripe customer object (and have it update on stripe) without going through my backend (other then to generate the ephemeral key). So I want to use the STPAddCardViewController to generate a token and then somehow upload that token to the stripe customer object using the Stripe iOS SDK rather than building my own endpoint to add the source myself on my node server.
air_ has quit
hpar
how is the user entering the card?
justin_
STPAddCardVC
hpar
ah, so you're calling it directly?
justin_
Yes, not through the PaymentMethodsVC because the behavior of the VC is not what I would like
I have my own TableVC that lists the current payment methods, has a plus button at the top right
hpar
ah, gotcha
right, and paymentcontext always uses paymentmethodsvc except (I think) on a new customer
justin_
When a user clicks on the plus button I want to call the AddCardVC which returns me a token through the delegate. But I want to upload that token to the current customers list of sources.
hpar
you _should_ be able to do the ephemeral key stuff the SDK does but I'm not sure if there's a public interface for it
justin_
I feel like this should be possible since this same exact behavior is apparent while using the PaymentContext and PaymentMethodsVC
Gotcha
If I have to do this all on my node server it isn't the end of the world. I would just like to not maintain it myself when I know that the Stripe SDK is well maintained and would keep that all up to date.
I think your use case (wanting to specifically show an "AddCardVC") probably makes sense and it should be able to use the customer context to do that out of the box
but for now there's no public part of the SDK you can use, though you're free to approximate your own version
davidyoung joined the channel
probably easier to just fire off an alamofire request tbh
(and add an endpoint to your Node backend)
justin_
Yeah you're probably right there
Too bad, I was pretty excited about the ephemeral key stuff but I don
t think that will do much for me now haha
hpar
yep, it's a good point to raise though! maybe something we might consider in a future version
justin_
Except maybe getting the list of current payments, so it's not a total waste. Thanks for your help
hpar
happy to!
justin_
I honestly am in love with Stripe's dev support and documentation. You all have a great thing going
Greg___
Anyone here familiar with the setup for apple pay domains?
hpar
thanks! always great to hear :)
Greg___: very, what's up?
Greg___
So we have two different stripe accounts associated with our application (CA and US accounts)
I just noticed the other day that we have been creating the domains for all our connected accounts through the api using our CA stripe secret key
However we have not had any reports of issues with apple pay
scott___ joined the channel
hpar
it shouldn't make a difference which account you register through, the main thing is that the domain + connected account combination have to be registered with Stripe and Apple
redraw joined the channel
Greg___
I see
So for example
If I told my connected account to trust google.com (which I obviously have no control over) as long as google had the domain association file setup then stripe would happily accept this?
hpar
justin_: oh hey
Greg___
And create the domain record in the connected account?
hpar
justin_: so STPCustomerContext implements STPBackendAPIAdapter, so you _can_ call attachSourceToCustomer on it directly
kies joined the channel
justin_
@hpar: I don't believe though that attachSourceToCustomer is part of the public API?
redraw
hi! question
justin_
At least I dont get any autocomplete option on customerContext other than clearCachedCustomer
hpar
Greg___: correct, stripe & apple assume if you can put the specific domain verification file on a domain then you are authorized to do apple pay things there as well