Aprouver le paiement
This commit is contained in:
parent
b3d5233d90
commit
3cf200cfc7
22 changed files with 4608 additions and 39 deletions
20
Yavsc/Views/Manage/PaymentInfo.cshtml
Normal file
20
Yavsc/Views/Manage/PaymentInfo.cshtml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
@using PayPal.Api
|
||||
@model Payment
|
||||
|
||||
<dl>
|
||||
<dt> État du paiment
|
||||
</dt>
|
||||
<dd> @SR[Model.state] @Model.failure_reason
|
||||
</dd>
|
||||
<dt>
|
||||
</dt>
|
||||
<dd>@Model.payment_instruction
|
||||
</dd>
|
||||
</dl>
|
||||
@if (Model.state=="created") {
|
||||
<a href="@Model.GetApprovalUrl()">Autoriser le paiement</a>
|
||||
}
|
||||
@{ var refundUrl = Model.GetHateoasLink("refund"); }
|
||||
@if (refundUrl!=null) {
|
||||
<a href="@refundUrl">Rembourser ce paiement</a>
|
||||
}
|
||||
|
|
@ -1,7 +1,20 @@
|
|||
@model PaypalPayment
|
||||
|
||||
@if (Model!=null && Model.Executor!=null) {
|
||||
@Html.DisplayFor(m=>m.Executor)
|
||||
@if (Model!=null && Model.PaypalPaymentId!=null) {
|
||||
|
||||
if (Model.Executor.Id == User.GetUserId()) {
|
||||
<text>
|
||||
Vous avez payé :
|
||||
</text>
|
||||
} else {
|
||||
<text>
|
||||
@Html.DisplayFor(m=>m.Executor.UserName) a payé :
|
||||
</text>
|
||||
}
|
||||
// Da failback
|
||||
<a asp-controller="Manage" asp-action="PaymentInfo" asp-route-id="@Model.PaypalPaymentId">@Model.PaypalPaymentId</a>
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
<div id="paypal-button"></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue