#cryptoboyjr_code

1 messages · Page 1 of 1 (latest)

magic plankBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1222616172357357611

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

lyric harbor
#

Hi

#

var options = new SessionCreateOptions
                {
                    CustomerEmail = emailAddress,
                    SuccessUrl = "https://other.sugarbertboxing.com/thankyouboxer.aspx",
                    CancelUrl = "https://other.sugarbertboxing.com/boxers.aspx",
                    //SuccessUrl = "http://localhost:2401/thankyouboxer.aspx",
                    //CancelUrl = "http://localhost:2401/boxers.aspx",
                    PaymentMethodTypes = new List<string>
                {
                    "card",
                },
                    LineItems = new List<SessionLineItemOptions>
                {
                    new SessionLineItemOptions
                    {
                        PriceData = new SessionLineItemPriceDataOptions
                        {
                            Currency = "usd",
                            //UnitAmount = 500,
                            UnitAmount = 3000, //30.00
                            ProductData = new SessionLineItemPriceDataProductDataOptions
                            {
                                Name = "Sugar Bert Boxing Registration",
                            }
                        },
                        Quantity = 1,
                    },
                },
                    Mode = "payment",
                };

#

Can I add expire url?

#

With session timeout patsmeter of somekind?

amber streamBOT
lyric harbor
#

Hi

thin swan
amber streamBOT
lyric harbor
#

Yes. Can I use some kind of expire url?

#

Redirect to?

#

There's successurl, cancelurl, is there expireurl?

celest yew
#

👋 stepping in

#

No there is not a specific expire URL

#

If a session is expired and the page is already open then the customer will see an error message

#

They can hit the back button to be sent to your cancel URL

lyric harbor
#

Perfect I like that

#

Is it possible to put the code for me as the parameter?

#

It's expires at = datetime?

celest yew
#

You use a UNIX timestamp

lyric harbor
#

var options = new SessionCreateOptions
                {
                    CustomerEmail = emailAddress,
                    SuccessUrl = "https://other.sugarbertboxing.com/thankyouboxer.aspx",
                    CancelUrl = "https://other.sugarbertboxing.com/boxers.aspx",
                    //SuccessUrl = "http://localhost:2401/thankyouboxer.aspx",
                    //CancelUrl = "http://localhost:2401/boxers.aspx",
                    PaymentMethodTypes = new List<string>
                {
                    "card",
                },
                    LineItems = new List<SessionLineItemOptions>
                {
                    new SessionLineItemOptions
                    {
                        PriceData = new SessionLineItemPriceDataOptions
                        {
                            Currency = "usd",
                            //UnitAmount = 500,
                            UnitAmount = 3000, //30.00
                            ProductData = new SessionLineItemPriceDataProductDataOptions
                            {
                                Name = "Sugar Bert Boxing Registration",
                            }
                        },
                        Quantity = 1,
                    },
                },
                    Mode = "payment",
                };

#

Can you paste in this code for me the location please?

#

Expiresat = datetime.now(20 minutes)

#

Something like that

celest yew
#

I'm not a dotnet dev, but I think it is ExpiresAt = <unix_timestamp>

lyric harbor
#

OK got it

#

Ty

#

Feel free to close thread