#inexorable

1 messages ยท Page 1 of 1 (latest)

vagrant spireBOT
fair fiber
#

Hello! Can you give me an example Checkout Session ID so I can take a look at what you're seeing?

modern forge
#

Do you mean the paymentIntentId it resolves to? ........
pi_3N0j2rK2FI13bfKB1ovte8vI

#

I appreciate your time

fair fiber
#

That works! Let me take a look...

modern forge
#

I can see the actual request received by Stripe is reporting as having no metadata.... hmmmm...

fair fiber
#

There's no metadata on this Payment Intent or the associated Checkout Session. What metadata do you expect to be here?

modern forge
#

So this is either a .net bug or user error

#

I added a few metatdata params that appear to not have been sent... 2 secs I'll chuck up a code snippet and hopefully the daftness will be clear

#

var options = new SessionCreateOptions {
LineItems = sessionLineItemOptions,
Metadata = metadata,
Mode = "payment",
SuccessUrl = AppBaseUrl(HttpContext) + "/vans/success",
CancelUrl = AppBaseUrl(HttpContext) + "/vans/cancel",
};

#

The lineItems is obviously working... so it's just if I messed up the metata data ... one sec ....

fair fiber
modern forge
#

var metadata = new Dictionary<string, string> {
{ "name", T.FullName },
{ "company", T.Company ?? "Not specified" },
{ "position", T.Position ?? "Not specified" },
{ "telephne", T.Telephone },
{ "email", T.Email },
{ "van", T.Van },
{ "date", T.HireDate?.ToLongDateString() ?? "-" },
{ "drivers", T.Drivers.ToString() },
{ "hours", T.Hours.ToString() },
{ "amount", amount.ToString() },
{ "product", productName },
{ "description", productDescription },
{ "message", T.Message ?? "-" }
};

fair fiber
#

Maybe log the value of metadata to make sure it contains what you expect?

modern forge
#

So I have initialised it, and attached it.... but only the line items seem to have gone through

#

Ok.. can I confirm... do you expect this to work? As in, does the CheckoutSession support Metadata?

fair fiber
modern forge
#

hmmm.... further down we have the payment_intent_data.metadata

#

I'm wondering if that one works but the CheckoutSession one doesn't - at least not from the .net kit

fair fiber
#

The .NET library should support metadata on the Checkout Session itself just fine. What version of the library are you using?

modern forge
#

2 secs - just trying out another tx with the metadata in the payment_intent thingy... I'll give the pi code in a mo

#

pi_3N0j2rK2FI13bfKB1ovte8vI

#

Missing from there too... looking more and more lik me... checking myself and metadata again

#

.net 41.10.0 (latest non-beta I believe)

fair fiber
#

Can you try this just to see if it works as expected or not?

Metadata = new Dictionary<string, string>
    {
        { "foo", "bar" },
        { "baz", "boo" },
    },
modern forge
#

Rubeus... I think I've found the problem. Brace yourself.

#

There's an outside chance I'm looking in the wrong Stripe account dashboard. This will be an epic user error if so..... 2 secs... (it has been a looooong night and day)

#

pi_3N1YouBAgICEUrDv0n8QNt3Q

fair fiber
#

Yeah, that one has metadata!

modern forge
#

It's all fine. Obviously. lol

#

I'm so greatful for your patience.

fair fiber
#

Happy to help. ๐Ÿ™‚

modern forge
#

What a muppet - finally noticed the dates were out - lol

#

That's what happens when you let a browser sign you in when youre tired - didn't check the account - too many clients - hehe

#

Thank you for yuour time - and I'm sorry - I will leave you help someone who needs it ๐Ÿ‘