sb.append("x_type=" + CARDACTION_CREDIT + "&");
sb.append("x_delim_data=TRUE&");
sb.append("x_delim_char=|&");
sb.append("x_relay_response=FALSE&");
PaymentTran payment = orderHeader.getPaymentTran();
if (payment == null) {
for (InvoiceHeader invoiceHeader : orderHeader.getInvoiceHeaders()) {
payment = invoiceHeader.getPaymentTran();
}
}
sb.append("x_trans_id=" + payment.getPaymentReference1() + "&");
sb.append("x_card_num=" + custCreditCardNum.substring(custCreditCardNum.length() - 4) + "&");
sb.append("x_amount=" + Format.getSimpleFloat(creditHeader.getCreditTotal()) + "&");
String line = sendTransmission(sb);