init commit over here
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
@page "/store/receipt"
|
||||
|
||||
<h3>Receipt</h3>
|
||||
|
||||
<div>
|
||||
<div id="AppName">
|
||||
<h1>Mistox</h1>
|
||||
<h2>https://mistox.net</h2>
|
||||
<h2>For Support or questions please email</h2>
|
||||
<h2>derek@mistox.net</h2>
|
||||
</div>
|
||||
<hr />
|
||||
<div id="PaymentDetails">
|
||||
<h2>Payment Method: @PayMethod</h2>
|
||||
<h3>Card Used: @Last4</h3>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<h1>@ItemTitle:</h1><h2>$@ItemCost</h2>
|
||||
<hr />
|
||||
<h1>Subtotal:</h1><h2>$@ItemCost</h2>
|
||||
<h1>Amount Charged:</h1><h2>$@ItemCost</h2>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<h1>Receipt ID: @ReceiptID</h1>
|
||||
<h1>Purchase Time: @PurchaseDateTime</h1>
|
||||
<h1>Customer: @CustomerID</h1>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<h1>Thank you</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
[SupplyParameterFromQuery]
|
||||
public string ReceiptID { get; set; } = "";
|
||||
|
||||
public string PurchaseDateTime{ get; set; } = "";
|
||||
public string CustomerID { get; set; } = "";
|
||||
public string ItemTitle { get; set; } = "";
|
||||
public string ItemCost { get; set; } = "";
|
||||
public string PayMethod { get; set; } = "";
|
||||
public string Last4 { get; set; } = "";
|
||||
|
||||
protected override void OnInitialized() {
|
||||
/*
|
||||
string resultBody = await (await Http.PostAsync( "/api/stripe/getreceipt", new StringContent(ReceiptID) )).Content.ReadAsStringAsync();
|
||||
ReceiptResponse receipt = JsonConvert.DeserializeObject<ReceiptResponse>( resultBody );
|
||||
if (receipt != null ) {
|
||||
if( receipt.Succeeded == "succeeded" ) {
|
||||
PurchaseDateTime = receipt.PurchaseDateTime;
|
||||
CustomerID = receipt.CustomerID;
|
||||
ItemTitle = receipt.ItemTitle;
|
||||
ItemCost = receipt.ItemCost;
|
||||
PayMethod = receipt.PayMethod;
|
||||
Last4 = receipt.Last4;
|
||||
} else {
|
||||
Nav.NavigateTo( "/" );
|
||||
}
|
||||
} else {
|
||||
Nav.NavigateTo( "/?ReceiptNotFound" );
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user