diff --git a/Yavsc/Views/Shared/DisplayTemplates/PaypalPayment.cshtml b/Yavsc/Views/Shared/DisplayTemplates/PaypalPayment.cshtml index f57e5313..c307b146 100644 --- a/Yavsc/Views/Shared/DisplayTemplates/PaypalPayment.cshtml +++ b/Yavsc/Views/Shared/DisplayTemplates/PaypalPayment.cshtml @@ -2,35 +2,33 @@ @if (Model!=null && Model.PaypalPaymentId!=null) { - if (Model.Executor.Id == User.GetUserId()) { + @if (Model.Executor.Id == User.GetUserId()) { - Vous avez payƩ : + Votre paiment } else { - @Html.DisplayFor(m=>m.Executor.UserName) a payƩ : + Le paiment de @Html.DisplayFor(m=>m.Executor.UserName) - } - // Da failback - @Model.PaypalPaymentId - - + } + : + @Model.PaypalPaymentId + } else {
- @@ -53,8 +51,12 @@ return paypal.request.post(EXECUTE_PAYMENT_URL, { paymentID: data.paymentID, payerID: data.payerID }) - .then(function(data) { /* Go to a success page */ }) - .catch(function(err) { /* Go to an error page */ }); + .then(function(data) { + document.location = '@(ViewData["SuccessUrl"])'; + /* Go to a success page */ }) + .catch(function(err) { + document.location = '/Manage/PaymentInfo/'+data.paymentID; + /* Go to an error page */ }); } }, '#paypal-button');