WS_PayByCC


Click here for a complete list of operations.

PostPayment

Post payment to selected Invoices Company Code [2 characters] External Company Reference [10 characters] Customer Number [int] Site Number [int] Invoice Number to be paid Payment Amount Payment Type Codes defined in Code Maintenance Payment Date Payment Reference [50 characters] Response code: PaymentSuccess = 1 PaymentDuplicated = 2 InvoiceNotFound = 3 CustomerNotFound = 4 SiteNotFound = 5 InvoicePaid = 6 Exception = 7 NotAuthorized = 8 InvalidPaymentDate = 9 CompanyReferenceNotFound = 10 InvalidPaymentType = 11

Test

To test the operation using the HTTP POST protocol, click the 'Invoke' button.
Parameter Value
sLoginComp:
companyReference:
cust:
site:
invoiceNumber:
amount:
paymentType:
paymentDate:
paymentReference:

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /TruxWeb/WSAcct_PayByCreditCard/WS_PayByCreditCard.asmx HTTP/1.1
Host: trux.organicdiversion.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.trux.com/PostPayment"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <Credentials xmlns="http://www.trux.com">
      <sAccountID>string</sAccountID>
      <sAuthCode>string</sAuthCode>
      <isAuthCodeEncrypted>boolean</isAuthCodeEncrypted>
      <areParametersEncrypted>boolean</areParametersEncrypted>
      <encryptedParameterNames>
        <string>string</string>
        <string>string</string>
      </encryptedParameterNames>
      <requireEncryptedResponse>boolean</requireEncryptedResponse>
      <encryptionMethod>string</encryptionMethod>
      <keyInfo>
        <encryptedKey>string</encryptedKey>
        <encryptionPublicKey>string</encryptionPublicKey>
      </keyInfo>
      <publicAuthKey>string</publicAuthKey>
    </Credentials>
  </soap:Header>
  <soap:Body>
    <PostPayment xmlns="http://www.trux.com">
      <sLoginComp>string</sLoginComp>
      <companyReference>string</companyReference>
      <cust>int</cust>
      <site>int</site>
      <invoiceNumber>string</invoiceNumber>
      <amount>decimal</amount>
      <paymentType>string</paymentType>
      <paymentDate>dateTime</paymentDate>
      <paymentReference>string</paymentReference>
    </PostPayment>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <PostPaymentResponse xmlns="http://www.trux.com">
      <PostPaymentResult>int</PostPaymentResult>
    </PostPaymentResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /TruxWeb/WSAcct_PayByCreditCard/WS_PayByCreditCard.asmx HTTP/1.1
Host: trux.organicdiversion.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Header>
    <Credentials xmlns="http://www.trux.com">
      <sAccountID>string</sAccountID>
      <sAuthCode>string</sAuthCode>
      <isAuthCodeEncrypted>boolean</isAuthCodeEncrypted>
      <areParametersEncrypted>boolean</areParametersEncrypted>
      <encryptedParameterNames>
        <string>string</string>
        <string>string</string>
      </encryptedParameterNames>
      <requireEncryptedResponse>boolean</requireEncryptedResponse>
      <encryptionMethod>string</encryptionMethod>
      <keyInfo>
        <encryptedKey>string</encryptedKey>
        <encryptionPublicKey>string</encryptionPublicKey>
      </keyInfo>
      <publicAuthKey>string</publicAuthKey>
    </Credentials>
  </soap12:Header>
  <soap12:Body>
    <PostPayment xmlns="http://www.trux.com">
      <sLoginComp>string</sLoginComp>
      <companyReference>string</companyReference>
      <cust>int</cust>
      <site>int</site>
      <invoiceNumber>string</invoiceNumber>
      <amount>decimal</amount>
      <paymentType>string</paymentType>
      <paymentDate>dateTime</paymentDate>
      <paymentReference>string</paymentReference>
    </PostPayment>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <PostPaymentResponse xmlns="http://www.trux.com">
      <PostPaymentResult>int</PostPaymentResult>
    </PostPaymentResponse>
  </soap12:Body>
</soap12:Envelope>

HTTP GET

The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.

GET /TruxWeb/WSAcct_PayByCreditCard/WS_PayByCreditCard.asmx/PostPayment?sLoginComp=string&companyReference=string&cust=string&site=string&invoiceNumber=string&amount=string&paymentType=string&paymentDate=string&paymentReference=string HTTP/1.1
Host: trux.organicdiversion.com
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<int xmlns="http://www.trux.com">int</int>

HTTP POST

The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.

POST /TruxWeb/WSAcct_PayByCreditCard/WS_PayByCreditCard.asmx/PostPayment HTTP/1.1
Host: trux.organicdiversion.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

sLoginComp=string&companyReference=string&cust=string&site=string&invoiceNumber=string&amount=string&paymentType=string&paymentDate=string&paymentReference=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<int xmlns="http://www.trux.com">int</int>