Initial Stripe payment rejection support * Store rejected transactions * Command...
[hcoop/portal.git] / money.mlt
index c6f92e3..63bfe0d 100644 (file)
--- a/money.mlt
+++ b/money.mlt
@@ -290,6 +290,21 @@ end %></textarea></td> </tr>
         val txid = Money.applyStripePayment stripePmt;
 %><h3>Stripe Payment Processed (Transaction <% txid %>)</h3>
 
+<% elseif $"cmd" = "stripeRejected" then
+%><h3>Stripe Payment Rejected!</h3>
+
+<% elseif $"cmd" = "stripeReject" then
+        Group.requireGroupName "money";
+        showNormal := false;
+%>
+<h3>Are you sure you want to reject Stripe Payment <% $"stripeChargeId" %>?</h3>
+<form method="post" action="/stripe/stripe-payment.cgi">
+        <input type="hidden" name="cmd" value="reject_member_payment" />
+        <input type="hidden" name="stripeChargeId" value="<% $"stripeChargeId" %>" />
+       <label>Reason for rejection <input type="text" name="reason" /></label>
+        <input type="submit" value="Really Reject Payment" />
+      </form>
+
 <% elseif $"modPay" <> "" then
        Group.requireGroupName "money";
        showNormal := false;
@@ -698,6 +713,12 @@ Co-op balance: $<% #amount (Balance.lookupBalance (valOf (Balance.balanceNameToI
         <input type="submit" value="Apply to Balance" /> <!-- also, refund? -->
       </form>
   </td>
+  <td><form method="post">
+        <input type="hidden" name="cmd" value="stripeReject" />
+        <input type="hidden" name="stripeChargeId" value="<% #charge_id stripePmt %>" />
+        <input type="submit" value="Reject Payment" /> <!-- also, refund? -->
+      </form>
+  </td>
 </tr>
 <% end %>
 </table>