payment: note that Stripe has instituted an additional 1% fee for non-US cards
[hcoop/portal.git] / payment.mlt
index 6468165..2394d46 100644 (file)
@@ -20,7 +20,7 @@ days.</p>
 <p>Remember that we credit member balances for payments <b>after subtracting service fees</b>. This means that, to increase your balance by a particular amount, you must make a <b>larger</b> payment
 than just that amount. Stripe and Paypal have equal fees (for US
 residents); You can calculate the amount <em>x</em> to send from the amount <em>y</em> you want us to receive with this formula: <tt><em>x</em> = (<em>y</em> +
-  0.30) / (1 - 0.029)</tt>.</p>
+  0.30) / (1 - 0.029)</tt>. Stripe charges an additional 1% fee for non-U.S. cards, even when paying in USD.</p>
 
 <div class="payment-tile">
 <h4>Add to your balance with <a href="https://paypal.com">PayPal</a></h4>
@@ -47,7 +47,7 @@ other countries may be different, consult <a href="https://www.paypal.com/us/cgi
    });
   </script>
 
-  <label>$<input id="paypalDues" type="text" name="amount" pattern="^\\d+\\.\\d\\d$" required="required" size="7" /></label>
+  <label>$<input id="paypalDues" type="text" name="amount" pattern="^\\d+(\\.\\d\\d)?$" required="required" size="7" /></label>
   <input type="submit" value="Add To Balance" />
 </form>
 
@@ -73,7 +73,7 @@ end %>
      $("#stripeDues").val ($(this).val ());
    });
   </script>
-  <label>$<input type="text" name="stripeDues" id="stripeDues" pattern="^\\d+\\.\\d\\d$" required="required" size="7" /></label>
+  <label>$<input type="text" name="stripeDuesUSD" id="stripeDues" pattern="^\\d+(\\.\\d\\d)?$" required="required" size="7" /></label>
   <input type="hidden" name="webuser_id" value="<% #id you %>" />
   <input type="hidden" name="webuser_name" value="<% #name you %>" />
   <input type="hidden" name="cmd" value="member_payment" />
@@ -91,10 +91,10 @@ end %>
        
        // Open Checkout with further options
        StripeCheckout.open({
-        key: 'pk_test_sJkMs1I4fVK4JQu9QkFDjOMs',
+        key: 'pk_live_pvWpH450opRXCi0KvN1h5mN1',
         image: '/globe.gif',
         name: 'Hcoop',
-        description: 'Dues',
+        description: 'Dues ($'.concat ($("#stripeDues").val ()).concat (')'),
         amount:  $("#stripeDues").val() * 100,
         currency: 'usd',
         address: true,