Difference between revisions of "Template:Payment form"
From cm2.liecourt.com
(Fill database) |
(Fill database) |
||
Line 27: | Line 27: | ||
</noinclude><includeonly>{{#vardefine:@cols|4-8}}<!-- | </noinclude><includeonly>{{#vardefine:@cols|4-8}}<!-- | ||
− | --><h1>Please fill in your payment information</h1><wsform action="get" loadscript="disableSubmitButtonOnSubmit" formtarget="{{localurl:Special:PayTrace}}" > | + | -->{{#if: {{{Paytrace validated customer id|}}}|<h1>Please submit your payment</h1>|<h1>Please fill in your payment information</h1>}}<wsform action="get" loadscript="disableSubmitButtonOnSubmit" formtarget="{{localurl:Special:PayTrace}}" > |
<wsfield name="transactions" id="{{{Type|}}}-transactions" value="{{{Transactions|}}}" type="hidden"></wsfield>{{#if: {{{Billing name|}}} | | <wsfield name="transactions" id="{{{Type|}}}-transactions" value="{{{Transactions|}}}" type="hidden"></wsfield>{{#if: {{{Billing name|}}} | | ||
{{Item responsive |Cols={{#var:@cols}} |1=Client name |2=<wsfield name="billing_address_name" id="{{{Type|}}}-billing-name" value="{{{Billing name|}}}" type="hidden" class="form-control" required="required"></wsfield>{{{Billing name|}}} }} }} | {{Item responsive |Cols={{#var:@cols}} |1=Client name |2=<wsfield name="billing_address_name" id="{{{Type|}}}-billing-name" value="{{{Billing name|}}}" type="hidden" class="form-control" required="required"></wsfield>{{{Billing name|}}} }} }} | ||
{{Item responsive |Cols={{#var:@cols}} |1=Price |2=<wsfield name="amount" id="{{{Type|}}}-price" value="{{{Price|}}}" type="hidden" class="form-control" required="required"></wsfield>{{{Price|}}} }} | {{Item responsive |Cols={{#var:@cols}} |1=Price |2=<wsfield name="amount" id="{{{Type|}}}-price" value="{{{Price|}}}" type="hidden" class="form-control" required="required"></wsfield>{{{Price|}}} }} | ||
+ | <wsfield name="Quantity" type="hidden" value="{{{Quantity|}}}" /> | ||
+ | <wsfield name="User" type="hidden" value="{{{User|}}}" /> | ||
{{Item responsive |Cols={{#var:@cols}} |1=Description |2=<wsfield name="description" id="{{{Type|}}}-description" type="hidden" class="form-control" required="required" value="{{{Description|}}}" />{{{Description|}}} }} | {{Item responsive |Cols={{#var:@cols}} |1=Description |2=<wsfield name="description" id="{{{Type|}}}-description" type="hidden" class="form-control" required="required" value="{{{Description|}}}" />{{{Description|}}} }} | ||
{{Item responsive |Cols={{#var:@cols}} |1=Invoice nr |2=<wsfield name="invoice_id" id="{{{Type|}}}-invoice-id" value="{{{Invoice id|}}}" type="hidden" class="form-control" required="required"></wsfield>{{{Invoice id|}}} }}{{#if: {{{Billing address|}}} | | {{Item responsive |Cols={{#var:@cols}} |1=Invoice nr |2=<wsfield name="invoice_id" id="{{{Type|}}}-invoice-id" value="{{{Invoice id|}}}" type="hidden" class="form-control" required="required"></wsfield>{{{Invoice id|}}} }}{{#if: {{{Billing address|}}} | | ||
− | {{Item responsive |Cols={{#var:@cols}} |1=Billing address street |2=<wsfield name="billing_address_street_address" id="{{{Type|}}}-billing-address" value="{{{Billing address|}}}" type="hidden" class="form-control" required="required"></wsfield>{{{Billing address|}}} }} }} | + | {{Item responsive |Cols={{#var:@cols}} |1=Billing address street |2=<wsfield name="billing_address_street_address" id="{{{Type|}}}-billing-address" value="{{{Billing address|}}}" type="hidden" class="form-control" required="required"></wsfield>{{{Billing address|}}} }} }} |
− | {{Item responsive |Cols={{#var:@cols}} |1=Billing email |2=<wsfield name="email" id="{{{Type|}}}-billing-email" value="{{{Billing email|}}}" type=" | + | {{Item responsive |Cols={{#var:@cols}} |1=Billing email |2=<wsfield name="email" id="{{{Type|}}}-billing-email" value="{{{Billing email|}}}" type="text" class="form-control" required="required"></wsfield>{{{Billing email|}}} }}{{#if: {{{Billing address 2|}}} | |
{{Item responsive |Cols={{#var:@cols}} |1=Billing address street 2 |2=<wsfield name="billing_address_street_address2" id="{{{Type|}}}-billing-address-2" value="{{{Billing address 2|}}}" type="hidden" class="form-control" required="required"></wsfield>{{{Billing address 2|}}} }} }}{{#if: {{{Billing city|}}} | | {{Item responsive |Cols={{#var:@cols}} |1=Billing address street 2 |2=<wsfield name="billing_address_street_address2" id="{{{Type|}}}-billing-address-2" value="{{{Billing address 2|}}}" type="hidden" class="form-control" required="required"></wsfield>{{{Billing address 2|}}} }} }}{{#if: {{{Billing city|}}} | | ||
{{Item responsive |Cols={{#var:@cols}} |1=Billing city |2=<wsfield name="billing_address_city" id="{{{Type|}}}-billing-city" value="{{{Billing city|}}}" type="hidden" class="form-control" required="required"></wsfield>{{{Billing city|}}} }} }}{{#if: {{{Billing state|}}} | | {{Item responsive |Cols={{#var:@cols}} |1=Billing city |2=<wsfield name="billing_address_city" id="{{{Type|}}}-billing-city" value="{{{Billing city|}}}" type="hidden" class="form-control" required="required"></wsfield>{{{Billing city|}}} }} }}{{#if: {{{Billing state|}}} | | ||
Line 43: | Line 45: | ||
{{Item responsive |Cols={{#var:@cols}} |1=Credit card nr |2=<wsfield name="credit_card_number" id="{{{Type|}}}-credit-card-nr" type="text" class="form-control" required="required"></wsfield> }} | {{Item responsive |Cols={{#var:@cols}} |1=Credit card nr |2=<wsfield name="credit_card_number" id="{{{Type|}}}-credit-card-nr" type="text" class="form-control" required="required"></wsfield> }} | ||
{{Item responsive |Cols={{#var:@cols}} |1=Credit card name |2=<wsfield name="CreditCardName" id="{{{Type|}}}-credit-card-name" type="text" class="form-control" required="required"></wsfield> }} | {{Item responsive |Cols={{#var:@cols}} |1=Credit card name |2=<wsfield name="CreditCardName" id="{{{Type|}}}-credit-card-name" type="text" class="form-control" required="required"></wsfield> }} | ||
− | {{Item responsive |Cols={{#var:@cols}} |1=Credit card | + | {{Item responsive |Cols={{#var:@cols}} |1=Credit card expirtion |2=<div class="d-flex">{{#Widget:Creditcard select|id=month|{{{Type|}}}-credit-card-expiration-month|name=credit_card_expiration_month|placeholder=MM|options=<option value="01"> |
− | + | <option value="02"> | |
− | {{Item responsive |Cols={{#var:@cols}} |1=Credit card csc |2=<wsfield name="csc" id="{{{Type|}}}-credit-card-csc" type="text" class="form-control" required="required"></wsfield> }} | + | <option value="03"> |
+ | <option value="04"> | ||
+ | <option value="05"> | ||
+ | <option value="06"> | ||
+ | <option value="07"> | ||
+ | <option value="08"> | ||
+ | <option value="09"> | ||
+ | <option value="10"> | ||
+ | <option value="11"> | ||
+ | <option value="12">}}<span class="sep">/</span><!-- | ||
+ | -->{{#Widget:Creditcard select|id={{{Type|}}}-credit-card-expiration-year|name=credit_card_expiration_year|placeholder=YY|options=<!-- | ||
+ | -->{{#vardefine: i | 0 }}{{#while: | ||
+ | | {{#ifexpr: {{#var: i }} < 20 | true }} | ||
+ | | <option value="{{#expr:{{#time:y|now}} + {{#var: i }} }}">{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }} | ||
+ | }}}}</div> }} | ||
+ | {{Item responsive |Cols={{#var:@cols}} |1=Credit card csc |2=<wsfield name="csc" placeholder="XXX" id="{{{Type|}}}-credit-card-csc" type="text" class="form-control" required="required"></wsfield> }} | ||
}}<!-- | }}<!-- | ||
Line 58: | Line 75: | ||
--><div class="text-right"> | --><div class="text-right"> | ||
− | <wsfield type="submit" id="makepayment" class="btn btn- | + | <wsfield type="submit" id="makepayment" class="btn btn-green float-right" value="Submit payment"/> |
</div> | </div> | ||
</wsform></includeonly> | </wsform></includeonly> |
Revision as of 14:45, 15 May 2020
This is the Payment form template. It should be called in the following format:
{{Payment form |Type= |Invoice id= |Description= |Billing name= |Billing email= |Price= |Billing address= |Billing address 2= |Billing city= |Billing state= |Billing zip= |Billing country= |Paytrace validated customer id= }}