Example

This example uses the web form gateway provider to implement Payment Express PX Fusion and PX Post integration.

Client form

<form id="PXFusion" method="post" enctype="multipart/form-data"
action="https://uat.paymentexpress.com/pxmi3/pxfusionauth" >

<div class="field">
<label class="input-label" for="card-name">Name on Card
<em class="required" aria-hidden="true">*</em>
</label>
<input class="input-text" id="card-holder" type="text" name="CardHolderName"
value="" required="" maxlength="82">
<div class="helper-msg-container" aria-atomic="true" aria-live="assertive" 
style="display: none;">
<svg class="icon alert">
<use xlink:href="#alert"></use>
</svg>
<p class="helper-msg" id="card-holder-msg-error"></p>
</div>
</div>

<div class="field">
<label class="input-label" for="card-number">Card Number
<em class="required" aria-hidden="true">*</em>
</label>
<input class="input-text" id="card-number" type="text" name="CardNumber"
value="" required="" maxlength="30">
<div class="helper-msg-container" aria-atomic="true" aria-live="assertive"
style="display: none;">
<svg class="icon alert">
<use xlink:href="#alert"></use>
</svg>
<p class="helper-msg" id="card-number-msg-error"></p>
</div>
</div>

<div class="fields-container">
<div class="mobile-row">
<div class="field month-container">
<label class="input-label" for="exp-date-month">Expiration Date
<em class="required" aria-hidden="true">*</em>
</label> 
<select class="input-text exp-date-month" name="ExpiryMonth" id="exp-date-year">
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select> 
<div class="helper-msg-container" aria-atomic="true" aria-live="assertive"
style="display: none;">
<svg class="icon alert">
<use xlink:href="#alert"></use>
</svg>
<p class="helper-msg" id="exp-date-month-msg-error"></p>
</div>
</div>
<div class="field year-container">
<label class="input-label" for="exp-date-year">Expiration Year
<em class="required" aria-hidden="true">*</em>
</label>
<select class="input-text exp-date-year" name="ExpiryYear" id="exp-date-year">
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option> 
</select>
<div class="helper-msg-container" aria-atomic="true" aria-live="assertive"
style="display: none;">
<svg class="icon alert">
<use xlink:href="#alert"></use>
</svg>
<p class="helper-msg" id="exp-date-year-msg-error"></p>
</div>
</div>
</div>
<div class="field ccv-container">
<label class="input-label" for="card-cvv" data-tooltip="The CVV (Card Verification Value)
is a 3 or 4 digit code embossed or imprinted on the signature panel on the reverse side of Visa, MasterCard and Discover cards and on the front of American Express cards." title="The CVV (Card Verification Value) is a 3 or 4 digit code embossed or imprinted on the signature panel on the reverse side of Visa, MasterCard and Discover cards and on the front of American Express cards.">CVV
<em class="required" aria-hidden="true">*</em>
</label>
<input class="input-text" id="card-cvv" type="text" name="Cvc2" value=""
required="" maxlength="4">
<div class="helper-msg-container" aria-atomic="true" aria-live="assertive"
style="display: none;">
<svg class="icon alert">
<use xlink:href="#alert"></use>
</svg>
<p class="helper-msg" id="card-cvv-msg-error"></p>
</div>
</div>
</div>
<input type="hidden" name="SessionId"
value = "{{oPaymentServerTransaction.CustomProperties.Get("SessionId")}}" />
<br />
<br />
<img src="https://www.paymentexpress.com/Image/pxlogowhite.png" alt="Payment Processor"
width="236" height="42" />
</form>

Prepare payment

<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns1="http://paymentexpress.com">
<s:Body><GetTransactionId xmlns="http://paymentexpress.com">
<username>InforCivicsPxF_Dev</username>
<password>2903c039f565e8e879e57bef94991f0f2d6f996afbf0bc3a92b21e6b05ebde86</password>
<tranDetail><amount>{{oDrawerTransaction.TransactionAmount}}</amount>
<currency>USD</currency>
<returnUrl>http://www.yahoo.com</returnUrl>
<txnRef>{{oDrawerTransaction.TransactionNumber}}</txnRef>
<txnType>Auth</txnType>
</tranDetail></GetTransactionId>
</s:Body></s:Envelope>

Format: XML

Host Address: https://uat.paymentexpress.com/pxf/pxf.svc

Request Method: Post

Headers:

  • SOAPAction "http://paymentexpress.com/IPxFusion/GetTransactionId"
  • POST https://uat.paymentexpress.com/PXF/pxf.svc HTTP/1.1
  • Host uat.paymentexpress.com

Mapping:

  • SessionId: *[local-name() = 'Envelope']/*[local-name()='Body']/* [local-name()='GetTransactionIdResponse']/*[local-name()='GetTransactionIdResult']/* [local-name()='sessionId']

Condition: SessionId IsNotEmpty

Preauthorize payment

<?xml version="1.0" encoding="UTF-8"?><s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns1="http://paymentexpress.com">
<s:Body>
<GetTransaction xmlns="http://paymentexpress.com">
<username>InforCivicsPxF_Dev</username>
<password>2903c039f565e8e879e57bef94991f0f2d6f996afbf0bc3a92b21e6b05ebde86</password>
<transactionId>{{oPaymentServerTransaction.CustomProperties.Get("SessionId")}}
</transactionId>
</GetTransaction>
</s:Body></s:Envelope>

Format: XML

Host Address: https://uat.paymentexpress.com/pxf/pxf.svc

Request Method: Post

Headers:

  • SOAPAction "http://paymentexpress.com/IPxFusion/GetTransaction"
  • POST https://uat.paymentexpress.com/PXF/pxf.svc HTTP/1.1
  • Host uat.paymentexpress.com

Mapping:

  • AuthResponseCode: *[local-name() = 'Envelope']/*[local-name()='Body']/* [local-name()='GetTransactionResponse']/*[local-name()='GetTransactionResult']/* [local-name()='responseCode']
  • AuthResponseText: *[local-name() = 'Envelope']/*[local-name()='Body']/* [local-name()='GetTransactionResponse']/*[local-name()='GetTransactionResult']/* [local-name()='responseText']
  • DpsTxnRef: *[local-name() = 'Envelope']/*[local-name()='Body']/* [local-name()='GetTransactionResponse']/*[local-name()='GetTransactionResult']/* [local-name()='dpsTxnRef']
  • CardNumber: *[local-name() = 'Envelope']/*[local-name()='Body']/* [local-name()='GetTransactionResponse']/*[local-name()='GetTransactionResult']/* [local-name()='cardNumber']
  • CardType: *[local-name() = 'Envelope']/*[local-name()='Body']/* [local-name()='GetTransactionResponse']/*[local-name()='GetTransactionResult']/* [local-name()='cardName']
  • DateExpiry: *[local-name() = 'Envelope']/*[local-name()='Body']/* [local-name()='GetTransactionResponse']/*[local-name()='GetTransactionResult']/* [local-name()='dateExpiry']
  • CardholderName: *[local-name() = 'Envelope']/*[local-name()='Body']/* [local-name()='GetTransactionResponse']/*[local-name()='GetTransactionResult']/* [local-name()='cardHolderName']

Condition:

  • DpsTxnRef IsNotEmpty
  • AuthResponseCode 00 Equals

Authorize payment

<Txn>
<PostUsername>InforCivics_Dev857</PostUsername>
<PostPassword>c7bed4db5</PostPassword>
<TxnType>Complete</TxnType>
<TxnRef>{{oDrawerTransaction.TransactionNumber}}-C</TxnRef>
<InputCurrency>USD</InputCurrency>
<Amount>{{oDrawerTransaction.TransactionAmount}}</Amount>
<DpsTxnRef>{{oPaymentServerTransaction.CustomProperties.Get("DpsTxnRef")}}
</DpsTxnRef>
</Txn>

Format: XML

Host Address: https://uat.paymentexpress.com/pxpost.aspx

Request Method: Post

Mapping:

  • CaptureResponseText: /Txn/Transaction/@responseText
  • PaymentServerTransaction.AuthorizationCode: /Txn/Transaction/AuthCode

Condition: PaymentServerTransaction.AuthorizationCodeIsNotEmpty

Void payment

<Txn>
<PostUsername>InforCivics_Dev857</PostUsername>
<PostPassword>c7bed4db5</PostPassword>
<TxnType>Void</TxnType>
<TxnRef>{{oDrawerTransaction.TransactionNumber}}-V</TxnRef>
<InputCurrency>USD</InputCurrency>
<Amount>{{oDrawerTransaction.TransactionAmount}}</Amount>
<DpsTxnRef>{{oPaymentServerTransaction.CustomProperties.Get("DpsTxnRef")}}
</DpsTxnRef>
</Txn>

Format: XML

Host Address: https://uat.paymentexpress.com/pxpost.aspx

Request Method: Post

Mapping:

  • VoidResponseText: /Txn/Transaction/@responseText

Reverse payment

<Txn>
<PostUsername>InforCivics_Dev857</PostUsername>
<PostPassword>c7bed4db5</PostPassword>
<TxnType>Refund</TxnType>
<TxnRef>{{oDrawerTransaction.TransactionNumber}}-R</TxnRef>
<InputCurrency>USD</InputCurrency>
<Amount>{{oDrawerTransaction.ReferenceTransactionNumber.TransactionAmount}}</Amount>
<DpsTxnRef>{{oDrawerTransaction.ReferenceTransactionNumber.PaymentServerTransaction.CustomProperties.Get("DpsTxnRef")}}
</DpsTxnRef>
</Txn>

Format: XML

Host Address: https://uat.paymentexpress.com/pxpost.aspx

Request Method: Post

Mapping:

  • RefundResponseText: /Txn/Transaction/@responseText

Condition: RefundResponseText APPROVED Equals

Inquire payment

<Txn>
<PostUsername>InforCivics_Dev857</PostUsername>
<PostPassword>c7bed4db5</PostPassword>
<TxnType>Status</TxnType>
<TxnRef>{{oDrawerTransaction.TransactionNumber}}-C</TxnRef>
</Txn>

Format: XML

Host Address: https://uat.paymentexpress.com/pxpost.aspx

Request Method: Post

Mapping:

  • InquireCaptureResponseText: /Txn/Transaction/@responseText
  • InquireCaptureResponseCode: /Txn/Transaction/@reco

Condition: InquireCaptureResponseCode 00 Equals

Inquire reversed payment

<Txn>
<PostUsername>InforCivics_Dev857</PostUsername>
<PostPassword>c7bed4db5</PostPassword>
<TxnType>Status</TxnType>
<TxnRef>{{oDrawerTransaction.TransactionNumber}}-R</TxnRef>
</Txn>

Format: XML

Host Address: https://uat.paymentexpress.com/pxpost.aspx

Request Method: Post

Mapping:

  • InquireRevCaptureResponseText: /Txn/Transaction/@responseText
  • InquireRevCaptureResponseCode: /Txn/Transaction/@reco

Condition: InquireRevCaptureResponseCode 00 Equals