#anarkali_42928

1 messages · Page 1 of 1 (latest)

drifting mortarBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

lethal wind
#

Because you didn't reply. We close threads after ~30 minutes of inactivity

next siren
#

ok

#

sent you screen shot

#

here when i call CreateCustomer , that direct goes to exception

lethal wind
#

That looks like an exception thrown by your code, not necessarily an API request returning an error. You can see in the screenshot it returns a 200 reponse indicating success

next siren
#

No , service is Stripe object

#

please check

lethal wind
#

There's a req_xxx in the screenshot

#

Please paste it here

next siren
#

before 2 weeks it was working fine

lethal wind
next siren
#

No

#

we have not changed code

#

we cheking with release package

#

which was already tested

#

please check screen shot it goes to Stipe.Exception

lethal wind
next siren
#

You need request if from Dashboard ?

#

req_DLIA42OXEMrRMW

lethal wind
#

As you can see that request was successful and returned a 200 response

next siren
#

{<Stripe.StripeResponse status=200 Request-Id=req_DLIA42OXEMrRMW Date=2024-02-13T10:26:23>}

lethal wind
#

So your code in that block where that API call is made is throwing an exception. You need to debug that

next siren
#

call from service.create direct jump to exception

#

have you seen Message in first screen shot?

lethal wind
#

Which version of the .NET SDK are you using?

next siren
#

.Net standard 2.0

#

this line throws exption

#

you there ?

lethal wind
#

Yes, please be patient

next siren
#

ok

lofty basin
#

@next siren can you copy and paste the complete Message from the exception so we can see the full string?

next siren
#

ok

#

Give me 5 min please

#

Invalid response object from API: "{
"id": "cus_PYQWpFWhwU0P4c",
"object": "customer",
"address": {
"city": "Andover",
"country": "US",
"line1": "456CranberryStreet",
"line2": "",
"postal_code": "67002",
"state": "KS"
},
"balance": 0,
"created": 1707821824,
"currency": null,
"default_currency": null,
"default_source": null,
"delinquent": false,
"description": null,
"discount": null,
"email": "basketball.stadium@customer35.consolidatedmessenger.com",
"invoice_prefix": "75976849",
"invoice_settings": {
"custom_fields": null,
"default_payment_method": null,
"footer": null,
"rendering_options": null
},
"livemode": false,
"metadata": {
"CustomerId": "1001"
},
"name": "BasketballStadium",
"phone": "987-555-0145",
"preferred_locales": [],
"shipping": null,
"tax_exempt": "none",
"test_clock": null
}"

#

Above is full string from Message

lofty basin
#

hmm. What version of the Newtonsoft Json.NET DLL does your project use? have you patched it in any way?

next siren
#

13.0.2.27524 this is Newtonsoft Json version we are using

lofty basin
#

does this only happen when creating Customers or when making other API calls?

next siren
#

not checked with other call, Can i give a try ?

lofty basin
#

sure, please do try.

next siren
#

Yes this happens to each API call

#

Invalid response object from API: "{
"id": "pm_1OjJqWG4DeLvSy0OGXBAXlBt",
"object": "payment_method",
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"card": {
"brand": "visa",
"checks": {
"address_line1_check": null,
"address_postal_code_check": null,
"cvc_check": "pass"
},
"country": "US",
"exp_month": 12,
"exp_year": 2025,
"fingerprint": "Gb0HxNnr4LInZsej",
"funding": "credit",
"generated_from": null,
"last4": "1111",
"networks": {
"available": [
"visa"
],
"preferred": null
},
"three_d_secure_usage": {
"supported": true
},
"wallet": null
},
"created": 1707822496,
"customer": "cus_PYQWpFWhwU0P4c",
"livemode": false,
"metadata": {},
"type": "card"
}"

#

i tried PaymentMethodService.Attach

lofty basin
#

hmm. I guess I'd suggest uninstalling the stripe-dotnet and JSON.NET dependencies from your project entirely and then adding them back, maybe something is corrupt in your environment.

next siren
#

yes , i did already

#

i removed stripe.net and Newtonsoft and then added again

lofty basin
#

hmm, not sure what else to try then. One option is to try using the latest version of stripe-dotnet, but that will require updating your overall code.
I suppose you could try a small standalone project doing some basic API calls, using the latest version of stripe-dotnet, and see if that has the same problem when deployed in the same environment.

next siren
#

Yes, i tried with latest Stipe.Net dll and that break our integration

#

if we want to use latest stripe , do we need to re-wite code?

lofty basin
#

yes, there are breaking change in each major version X.y.y. and you'd be moving from 39.y.y to 43.y.y

next siren
#

'SessionLineItemOptions' does not contain a definition for 'Amount'
'SessionLineItemOptions' does not contain a definition for 'Currency'   
'SessionLineItemOptions' does not contain a definition for 'Description'
'SessionLineItemOptions' does not contain a definition for 'Name'
'PaymentIntent' does not contain a definition for 'Charges' and no accessible extension method 'Charges' accepting a first argument of type 'PaymentIntent' could be found

#

What will be substitute for this ?

lofty basin
#

for SessionLineItemOptions, passing a Price object, or using PriceData.

#

note there would be many many changes here so I can't go through all of them with you.

What I would suggest is setting up a really simple project with a simple API call to just e.g. create a Customer and nothing else, use the latest version of stripe-dotnet in that project, and then deploy and run that project in the same environment as your application with the problem and see if it works or not. If it works then you at least have some sort of path forward, if it doesn't then you know something is strange in your environment/dependencies

next siren
#

ok