Zee
Zee
Explore posts from servers
Mmfad
Created by Jake on 11/21/2024 in #questions-and-advice
Best open cuff baggy joggers
or try second hand
11 replies
Mmfad
Created by Jake on 11/21/2024 in #questions-and-advice
Best open cuff baggy joggers
maybe weekday might have something
11 replies
Mmfad
Created by Clark'sDesertBot on 11/19/2024 in #topic-of-the-day
Today I Learned- - Topic of the day 11/19/24
oh right thats a pretty cool idea
19 replies
Mmfad
Created by Clark'sDesertBot on 11/19/2024 in #topic-of-the-day
Today I Learned- - Topic of the day 11/19/24
is the one in the final pic? with the tshirt? if not can you link it pls
19 replies
Mmfad
Created by Clark'sDesertBot on 11/18/2024 in #topic-of-the-day
Brand Spotlight: Balenciaga - Topic of the day 11/18/24
way out of budget for me lol so never really checked out their stuff. But I feel like its the clothes an old bond villain would wear lol
131 replies
Mmfad
Created by Zee on 11/13/2024 in #questions-and-advice
why does this jacket flare out so much?
Oh right thanks I don’t mind a bit of flare but was just too much for me
3 replies
Mmfad
Created by Bluboy on 11/8/2024 in #questions-and-advice
My uniqlo knit jacket just arrived
Fit*
4 replies
Mmfad
Created by Bluboy on 11/8/2024 in #questions-and-advice
My uniqlo knit jacket just arrived
I like the cardigan it’s nice the second fit looks nicer. I like the yellow shirt but don’t think it works nice with grey. Maybe black trousers, red shirt and the jacket would be nice too if you wanna try another for
4 replies
CC#
Created by Zee on 11/7/2024 in #help
implement stripe payment feature for asp.net core web api and wpf
anyone?
5 replies
CC#
Created by Zee on 11/7/2024 in #help
implement stripe payment feature for asp.net core web api and wpf
and then I call it here in my wpf
public PaymentPage(FlightOfferDTO flightOffer)
{
InitializeComponent();
FlightOffer = flightOffer;

// Bind data to UI
FlightDetailsTextBlock.Text = $"Flight Number: {FlightOffer.FlightNumber}";
TotalPriceTextBlock.Text = $"${FlightOffer.Price}";
}

private async void ProceedToPaymentButton_Click(object sender, RoutedEventArgs e)
{
// Replace with your API's base address and endpoint
string apiUrl = "https://localhost:7186/api/payment/create-checkout-session";

// Use HttpClient to call the API
using (HttpClient client = new HttpClient())
{
try
{
// Make a POST request to the API
HttpResponseMessage response = await client.PostAsync(apiUrl, null);

// Check if the response is successful
if (response.IsSuccessStatusCode)
{
var responseContent = await response.Content.ReadAsStringAsync();
var jsonResponse = JObject.Parse(responseContent);

// Extract the sessionId
string sessionId = jsonResponse["sessionId"].ToString();

// Redirect to Stripe Checkout
string checkoutUrl = $"https://checkout.stripe.com/pay/{sessionId}";
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
{
FileName = checkoutUrl,
UseShellExecute = true
});
}
else
{
MessageBox.Show("Failed to create a checkout session.");
}
}
catch (Exception ex)
{
MessageBox.Show($"An error occurred: {ex.Message}");
}
}
}
public PaymentPage(FlightOfferDTO flightOffer)
{
InitializeComponent();
FlightOffer = flightOffer;

// Bind data to UI
FlightDetailsTextBlock.Text = $"Flight Number: {FlightOffer.FlightNumber}";
TotalPriceTextBlock.Text = $"${FlightOffer.Price}";
}

private async void ProceedToPaymentButton_Click(object sender, RoutedEventArgs e)
{
// Replace with your API's base address and endpoint
string apiUrl = "https://localhost:7186/api/payment/create-checkout-session";

// Use HttpClient to call the API
using (HttpClient client = new HttpClient())
{
try
{
// Make a POST request to the API
HttpResponseMessage response = await client.PostAsync(apiUrl, null);

// Check if the response is successful
if (response.IsSuccessStatusCode)
{
var responseContent = await response.Content.ReadAsStringAsync();
var jsonResponse = JObject.Parse(responseContent);

// Extract the sessionId
string sessionId = jsonResponse["sessionId"].ToString();

// Redirect to Stripe Checkout
string checkoutUrl = $"https://checkout.stripe.com/pay/{sessionId}";
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
{
FileName = checkoutUrl,
UseShellExecute = true
});
}
else
{
MessageBox.Show("Failed to create a checkout session.");
}
}
catch (Exception ex)
{
MessageBox.Show($"An error occurred: {ex.Message}");
}
}
}
5 replies
CC#
Created by Zee on 11/7/2024 in #help
implement stripe payment feature for asp.net core web api and wpf
public class PaymentService
{

public PaymentService(IOptions<StripeOptions> stripeSettings)
{
StripeConfiguration.ApiKey = stripeSettings.Value.SecretKey;
}



public Stripe.Checkout.Session CreateCheckoutSession(string successUrl, string cancelUrl, string amount)
{
var options = new Stripe.Checkout.SessionCreateOptions
{
PaymentMethodTypes = new List<string>
{
"card",
},
LineItems = new List<SessionLineItemOptions>
{
new SessionLineItemOptions
{
PriceData = new SessionLineItemPriceDataOptions
{
UnitAmount = Convert.ToInt32(amount) * 100,
Currency = "usd",
ProductData = new SessionLineItemPriceDataProductDataOptions
{
Name = "Product Name",
Description = "Product Description"

},
},
Quantity = 1,
},
},
Mode = "payment",
SuccessUrl = successUrl,
CancelUrl = cancelUrl,
};

var service = new Stripe.Checkout.SessionService();
Stripe.Checkout.Session session = service.Create(options);

return session;
}

}
public class PaymentService
{

public PaymentService(IOptions<StripeOptions> stripeSettings)
{
StripeConfiguration.ApiKey = stripeSettings.Value.SecretKey;
}



public Stripe.Checkout.Session CreateCheckoutSession(string successUrl, string cancelUrl, string amount)
{
var options = new Stripe.Checkout.SessionCreateOptions
{
PaymentMethodTypes = new List<string>
{
"card",
},
LineItems = new List<SessionLineItemOptions>
{
new SessionLineItemOptions
{
PriceData = new SessionLineItemPriceDataOptions
{
UnitAmount = Convert.ToInt32(amount) * 100,
Currency = "usd",
ProductData = new SessionLineItemPriceDataProductDataOptions
{
Name = "Product Name",
Description = "Product Description"

},
},
Quantity = 1,
},
},
Mode = "payment",
SuccessUrl = successUrl,
CancelUrl = cancelUrl,
};

var service = new Stripe.Checkout.SessionService();
Stripe.Checkout.Session session = service.Create(options);

return session;
}

}
5 replies
Mmfad
Created by oman121 on 11/2/2024 in #questions-and-advice
Help me find this tie
What where is the post of the fit I wanna see where the coat and tie r from
24 replies
Mmfad
Created by Sam on 11/2/2024 in #questions-and-advice
Warehouse Shoes Suggestions
If you like the ones they give you keep em if not it’s worth investing in some ones that fit and don’t give you pain. I worked at another warehouse for 4 months the boots they gave were too big and uncomfy now my right foot and ankle hurts when I walk it’s been like this for a month with this pain I’ve started doing some exercises for my foot and it’s getting better. But try to prevent rather than fixing a problem
15 replies
Mmfad
Created by Sam on 11/2/2024 in #questions-and-advice
Warehouse Shoes Suggestions
These are true to size and comfy Rona Shoes Safety Boots Work... https://www.amazon.co.uk/dp/B0C2B5FS9W?ref=ppx_pop_mob_ap_share
15 replies
Mmfad
Created by Sam on 11/2/2024 in #questions-and-advice
Warehouse Shoes Suggestions
They should give you a pair. Be prepared to size down like 2 sizes and also those boots are hella uncomfortable. I bought some on amazon for 40£ they’re steel toe cap and come up above the ankle so they meet the companies requirements and are comfy
15 replies
Mmfad
Created by Zee on 11/1/2024 in #questions-and-advice
can you clean mould off fake leather shoes?
Yeah thanks
5 replies
Mmfad
Created by Zee on 11/1/2024 in #questions-and-advice
can you clean mould off fake leather shoes?
I feel so dumb for letting this happen probs my fav shoes I bought. All my other pairs are fine
5 replies
CC#
Created by Zee on 10/31/2024 in #help
How to display api json data into a wpf page
thx
49 replies
CC#
Created by Zee on 10/31/2024 in #help
How to display api json data into a wpf page
tgx
49 replies