question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problems creating source

See original GitHub issue

I’m trying to create a source id to send to backend which is expecting it in this format: src_1Bbn7iEnsJaaAUJe1UZASnCd

However I’m getting this error when trying to create it with createSourceWithParams using a test card number: No such source: card_1Bn6l9EnsJaaAUJeE8ZWQ0uU

This is my code, I probably missed something. I retrieve the card Id from paymentRequestWithCardForm(), apparently this is not correct. I’m not sure what other card ID is expected. Any help is appreciated.

stripe.paymentRequestWithCardForm()
   .then((data) => {

     if(data.card) {
       const cardId = data.card.cardId
   
       stripe.createSourceWithParams({
         type: 'threeDSecure',
         currency: 'eur',
         amount: 1000,
         name: 'Test',
         returnURL: 'xxxx-stripe://stripe-redirect',
         card: cardId
       })
     }

   })
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ratkus91commented, Apr 12, 2018

We can just use REST API

stripe

{
    "id": "src_1CG3vsIoYsg4cTtdYPOIoge1",
    "object": "source",
    "amount": null,
    "client_secret": "src_client_secret_CfOjaD1IRtt1m9PjGvovEjjg",
    "created": 1523533780,
    "currency": null,
    "flow": "none",
    "livemode": false,
    "metadata": {},
    "owner": {
        "address": {
            "city": null,
            "country": null,
            "line1": null,
            "line2": null,
            "postal_code": "42424",
            "state": null
        },
        "email": null,
        "name": "wer",
        "phone": null,
        "verified_address": null,
        "verified_email": null,
        "verified_name": null,
        "verified_phone": null
    },
    "statement_descriptor": null,
    "status": "chargeable",
    "type": "card",
    "usage": "reusable",
    "card": {
        "exp_month": 4,
        "exp_year": 2024,
        "address_zip_check": "unchecked",
        "brand": "Visa",
        "card_automatically_updated": false,
        "country": "US",
        "cvc_check": "unchecked",
        "funding": "credit",
        "last4": "3063",
        "three_d_secure": "required",
        "address_line1_check": null,
        "tokenization_method": null,
        "dynamic_last4": null
    }
}

And we can see: Source - “id”: “src_1CG3vsIoYsg4cTtdYPOIoge1”, And - “three_d_secure”: “required”,

Next, we can use this Source instead Card. Also we can create new Source with Three D Secure on the Backend side

2reactions
dextorioncommented, Mar 5, 2018

I am guessing that the createSourceWithParams method expects not a card_****** but a src_******. The problem here is that tipsi-stripe library does not support createSourceWithParams with type: card. Stripe.js requires you to create s Source with type card, before you are able to create a Source with type threeDsecure. But with tipsi-stripe this is not supported.

I have the same problem, and hope this will be prioritized.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating an issue - GitHub Docs
Use the "Repository" drop-down menu, and select the repository you want to open the issue in. Type a descriptive title and body for...
Read more >
Creating a problem - IBM
You create a problem to record an underlying cause of one or more issues with service delivery or service support. Creating the problem...
Read more >
3 Things you should do to quickly fix your problem in a open ...
Here are 3 tips for you to quickly fix problems in open source, it might be intuitive, but useful if you haven't tried...
Read more >
Problems with Sources - The Áed - WordPress.com
I want to look further at the problems a historian has when studying sources. Each type of source has it's advantages and disadvantages....
Read more >
Configure Problem Sources - YouTube
In this video, we'll be taking a closer look at how to configure your Problem Sources as an Admin User.If you want to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found