{"action":"closed","issue":{"url":"https://api.github.com/repos/stripe/react-stripe-elements/issues/230","repository_url":"https://api.github.com/repos/stripe/react-stripe-elements","labels_url":"https://api.github.com/repos/stripe/react-stripe-elements/issues/230/labels{/name}","comments_url":"https://api.github.com/repos/stripe/react-stripe-elements/issues/230/comments","events_url":"https://api.github.com/repos/stripe/react-stripe-elements/issues/230/events","html_url":"https://github.com/stripe/react-stripe-elements/issues/230","id":349366154,"node_id":"MDU6SXNzdWUzNDkzNjYxNTQ=","number":230,"title":"Restore elementRef","user":{"login":"schemata-nick","id":38153395,"node_id":"MDQ6VXNlcjM4MTUzMzk1","avatar_url":"https://avatars2.githubusercontent.com/u/38153395?v=4","gravatar_id":"","url":"https://api.github.com/users/schemata-nick","html_url":"https://github.com/schemata-nick","followers_url":"https://api.github.com/users/schemata-nick/followers","following_url":"https://api.github.com/users/schemata-nick/following{/other_user}","gists_url":"https://api.github.com/users/schemata-nick/gists{/gist_id}","starred_url":"https://api.github.com/users/schemata-nick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schemata-nick/subscriptions","organizations_url":"https://api.github.com/users/schemata-nick/orgs","repos_url":"https://api.github.com/users/schemata-nick/repos","events_url":"https://api.github.com/users/schemata-nick/events{/privacy}","received_events_url":"https://api.github.com/users/schemata-nick/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-10T03:45:29Z","updated_at":"2018-08-10T17:18:11Z","closed_at":"2018-08-10T17:18:11Z","author_association":"NONE","body":"In the last push my integration stopped working. After checking the code/release it's because the elementRef property was removed in this commit:\r\n\r\nhttps://github.com/stripe/react-stripe-elements/pull/210\r\n\r\nMy use case is that I'm passing my own stripe instance into the StripeProvider, and generating a token using createToken\r\n\r\nNot looking for a fancy forms library, merely a secure credit card input, and Elements seems to be the only pathway to that with Stripe. I have my own 'Pay' button so that it can be styled, debounced, hidden with 'processing' message, etc\r\n\r\nIt's ok to use onReady (or onChange) to validate when the user is ready to pay, but when they click the pay button I need to be able to use Stripe.createToken(cardRef). It needs to be done on click as the tokens quickly go stale, so it's best to generate one the moment the user decides to pay rather than earlier\r\n\r\nThe onReady function isn't actually a duplicate on elementRef, it's a duplicate of onChange, as the ready information is already found in the change.complete boolean attribute. Could onReady be removed instead if one is going to?\r\n\r\nAppreciate the work of creating this clean wrapper which is why I migrated over to it. I'll revert to 1.* release and will have to migrate back to the raw stripe elements library if this isn't where you're going with it\r\n\r\nThanks\r\n\r\n\r\n"}}
{"actor":{"display_login":"jez"}}