My Profile_


Re-Authorization

If a Pre-Authorization transaction has already taken place, and not all the locked funds were released by a Completion transaction, a Re-Authorization allows you to lock the remaining funds so that they can be released by another Completion transaction in the future.

Re-Authorization is necessary because funds that have been locked by a Pre-Authorization transaction can only be released by a Completion transaction one time. If the Completion amount is less than the Pre-Authorization amount, the remaining money cannot be "completed".

Canada Code Sample

package Canada;

import JavaAPI.*;

public class TestCanadaReauth
{
	public static void main(String[] args)
	{
		String store_id = "moneris";
		String api_token = "hurgle";
		String order_id = "mvt271355ss7ssss839ssdfsdfsdf";
		String orig_order_id = "mvt3213820409";
		String amount = "4.00";
		String txn_number = "200069-0_10";
		String crypt = "8";
		String dynamic_descriptor = "123456";
		String cust_id = "my customer id";
		String processing_country_code = "CA";
		boolean status_check = false;

		ReAuth reauth = new ReAuth();
		reauth.setOrderId(order_id);
		reauth.setCustId(cust_id);
		reauth.setOrigOrderId(orig_order_id);
		reauth.setTxnNumber(txn_number);
		reauth.setAmount(amount);
		reauth.setCryptType(crypt);
		reauth.setDynamicDescriptor(dynamic_descriptor);

		HttpsPostRequest mpgReq = new HttpsPostRequest();
		mpgReq.setProcCountryCode(processing_country_code);
		mpgReq.setTestMode(true); //false or comment out this line for production transactions
		mpgReq.setStoreId(store_id);
		mpgReq.setApiToken(api_token);
		mpgReq.setTransaction(reauth);
		mpgReq.setStatusCheck(status_check);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("ISO = " + receipt.getISO());
			System.out.println("BankTotals = " + receipt.getBankTotals());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Ticket = " + receipt.getTicket());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("IsVisaDebit = " + receipt.getIsVisaDebit());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSAReauth
{
	public static void main(String[] args)
	{
		String store_id = "monusqa002";
		String api_token = "qatoken";
		String orig_order_id = "mvt3213892328";
		String order_id = "orsas2dfssasSS3dssssd333faadfa";
		String txn_number = "837958-0_25";
		String amount = "1.00";
		String crypt = "8";
		String descriptor = "my descriptor";
		String cust_id = "my customer id";
		String processing_country_code = "US";
		boolean status_check = false;

		ReAuth reauth = new ReAuth();
		reauth.setOrderId(order_id);
		reauth.setCustId(cust_id);
		reauth.setOrigOrderId(orig_order_id);
		reauth.setTxnNumber(txn_number);
		reauth.setAmount(amount);
		reauth.setCryptType(crypt);
		reauth.setDynamicDescriptor(descriptor);

		HttpsPostRequest mpgReq = new HttpsPostRequest();
		mpgReq.setProcCountryCode(processing_country_code);
		mpgReq.setTestMode(true); //false or comment out this line for production transactions
		mpgReq.setStoreId(store_id);
		mpgReq.setApiToken(api_token);
		mpgReq.setTransaction(reauth);
		mpgReq.setStatusCheck(status_check);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("ISO = " + receipt.getISO());
			System.out.println("BankTotals = " + receipt.getBankTotals());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Ticket = " + receipt.getTicket());
			System.out.println("TimedOut = " + receipt.getTimedOut());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                

Re-Authorization transaction object definition

ReAuth reauth = new ReAuth();

HttpsPostRequest object for Re-Authorization transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(reauth);

Re-Authorization mandatory values

Value Type Limits Set method Description
Order ID String 50-character alphanumeric reauth.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every Purchase, PreAuth and Independent Refund transaction. No two transactions of these types may have the same order ID.

For Refund, Completion and Purchase Correction transactions, the order ID must be the same as that of the original transaction.

The last 10 characters of the order ID are displayed in the “Invoice Number” field on the Merchant Direct Reports. However only letters, numbers and spaces are sent to Merchant Direct.

A minimum of 3 and a maximum of 10 valid characters are sent to Merchant Direct. Only the last characters beginning after any invalid characters are sent. For example, if the order ID is 1234-567890, only 567890 is sent to Merchant Direct. If the order ID has fewer than 3 characters, it may display a blank or 0000000000 in the Invoice Number field.
Original order ID String 50-character alphanumeric reauth.setOrigOrderId(orig_order_id); Order ID of the Risk transaction to be asserted.
Amount String 9-character numeric reauth.setAmount(amount); Transaction amount. Used in a number of transactions. Note that this is different from the amount used in a Completion transaction, which is an alphanumeric value.

This must contain at least 3 digits, two of which are penny values.

The minimum allowable value is $0.01, and the maximum allowable value is 999 999.99. Transaction amounts of $0.00 are not allowed.
Transaction number String 255-character alphanumeric reauth.setTxnNumber(txn_number); Used when performing follow-on transactions. (That is, Completion, Purchase Correction or Refund.) This must be the value that was returned as the transaction number in the response of the original transaction.

When performing a Completion, this value must reference the Pre-Authorization. When performing a Refund or a Purchase Correction, this value must reference the Completion or the Purchase.
E-Commerce indicator String 1-character alphanumeric reauth.setCryptType(crypt); 1: Mail Order / Telephone Order—Single
2: Mail Order / Telephone Order—Recurring
3: Mail Order / Telephone Order—Instalment
4: Mail Order / Telephone Order—Unknown classification
5: Authenticated e-commerce transaction (VBV)
6: Non-authenticated e-commerce transaction (VBV)
7: SSL-enabled merchant
8: Non-secure transaction (web- or email-based)
9: SET non-authenticated transaction

Re-Authorization optional values

Value Type Limits Set method Description
Customer ID String 50-character alphanumeric reauth.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number and so on.
This field is searchable from the Moneris Merchant Resource Centre.
Dynamic Descriptor String 20-character alphanumeric reauth.setDynamicDescriptor(dynamic_descriptor); Merchant-defined description sent on a per-transaction basis that will appear on the credit card statement appended to the merchant’s business name.
Customer Information Object Not applicable. reauth.setCustInfo(customer);
AVS Object Not applicable. reauth.setAvsInfo(avsCheck);
CVD Object Not applicable. reauth.setCvdInfo(cvdCheck);

Predecessors
  • Partial Completion
Successors
  • Tokenize
  • Completion

Re-Authorization with Customer Information

The Customer Information object is an optional add-on to a number of transactions. The Customer Information object offers a number of fields to be submitted as part of the financial transaction, and stored by Moneris. These details may be viewed in the future in the Merchant Resource Center.

In addition to instantiating a transaction object and a connection object (as you would for a normal transaction), you must instantiate a CustInfo object. Any transaction that supports CustInfo has a setCustInfo method. This is used to write the customer information to the transaction object.

The Customer Information object holds three types of information:

  • Miscellaneous customer information properties
  • Billing/Shipping information
  • Item information

Things to consider:

  • If you send characters that are not included in the allowed list, these extra transaction details may not be stored.
  • All fields are alphanumeric and allow the following characters: a-z A-Z 0-9 _ - : . @ $ = /
  • All French accents should be encoded as HTML entities, such as é
  • The data sent in Billing and Shipping Address fields will not be used for any address verification.

Canada Code Sample

package Canada;
import java.io.*;

import JavaAPI.*;

public class TestCanadaReAuthCustInfo
{
	public static void main(String args[]) throws IOException
	{
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();
		
		String store_id = "moneris";
		String api_token = "hurgle";
		String cust_id = "Hilton_1";
		String amount = "1.00";
		String orig_order_id = "mvt3213820409";
		String txn_number = "200069-0_10";
		String crypt = "7";
		String processing_country_code = "CA";

		/********************* Billing/Shipping Variables ********************/

		String last_name = "Harris";
		String first_name = "Tommie";
		String company_name = "Da Bears";
		String address = "454 Michigan Ave";
		String city = "Chicago";
		String province = "Illinois";
		String zip_code = "99879";
		String country = "USA";
		String phone_number = "764-908-9989";
		String fax = "764-908-9990";
		String tax1 = "1.00";
		String tax2 = "1.00";
		String tax3 = "1.00";
		String shipping_cost = "2.00";

		/************************* Line Item Variables *************************/

		String[] name = new String[]{"Mini Bears Helmet", "Mini Bills Helmet"};
		String[] quantity = new String[]{"1", "2"};
		String[] product_code = new String[] {"BEOOOWS9", "BUFD099D"};
		String[] extended_amount = new String[] {"4.00", "6.00"};

		/************************ Miscellaneous Variables **********************/

		String email = "T.Harris@ChicagoBears.com";
		String instructions = "Must arrive before opening day at Lambeau";

		/*********************** Transaction Object *******************************/

		ReAuth reauth = new ReAuth ();
		reauth.setOrderId(order_id);
		reauth.setCustId(cust_id);
		reauth.setAmount(amount);
		reauth.setOrigOrderId(orig_order_id);
		reauth.setTxnNumber(txn_number);
		reauth.setCryptType(crypt);

		BillingLocation billingAddress =
				new BillingLocation  (last_name, first_name, company_name, address,
						city, province, zip_code, country, phone_number,
						fax, tax1, tax2, tax3, shipping_cost);

		ShippingLocation shippingAddress =
				new ShippingLocation  (last_name, first_name, company_name, address,
						city, province, zip_code, country, phone_number,
						fax, tax1, tax2, tax3, shipping_cost);

		/************************ Line Item Object ************************************/

		Item[] lineItems = new Item[]{new Item(name[0], quantity[0], product_code[0], extended_amount[0]),
				new Item(name[1], quantity[1], product_code[1], extended_amount[1])};


		/************************* Customer Information Object *************************/

		CustomerInfo custData =
				new CustomerInfo (billingAddress, shippingAddress, email, instructions, lineItems);


		reauth.setCustInfo (custData);

		/************************ Request Object ******************************/


		HttpsPostRequest mpgReq = new HttpsPostRequest();
		mpgReq.setProcCountryCode(processing_country_code);
		mpgReq.setTestMode(true); //false or comment out this line for production transactions
		mpgReq.setStoreId(store_id);
		mpgReq.setApiToken(api_token);
		mpgReq.setTransaction(reauth);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("BankTotals = " + receipt.getBankTotals());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Ticket = " + receipt.getTicket());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("IsVisaDebit = " + receipt.getIsVisaDebit());

		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSAReAuthCustInfo
{
	public static void main(String args[])
	{
		String store_id = "monusqa002";
		String api_token = "qatoken";

		java.util.Date createDate = new java.util.Date();
		String order_id = "Test"+createDate.getTime();
		String cust_id = "Hilton_1";
		String amount = "1.00";
		String orig_order_id = "mvt3213892328";
		String txn_number = "837958-0_25";
		String crypt = "7";
		String processing_country_code = "US";

		/********************* Billing/Shipping Variables ********************/

		String last_name = "Harris";
		String first_name = "Tommie";
		String company_name = "Da Bears";
		String address = "454 Michigan Ave";
		String city = "Chicago";
		String province = "Illinois";
		String zip_code = "99879";
		String country = "USA";
		String phone_number = "764-908-9989";
		String fax = "764-908-9990";
		String tax1 = "1.00";
		String tax2 = "1.00";
		String tax3 = "1.00";
		String shipping_cost = "2.00";

		/************************* Line Item Variables *************************/

		String[] name = new String[]{"Mini Bears Helmet", "Mini Bills Helmet"};
		String[] quantity = new String[]{"1", "2"};
		String[] product_code = new String[] {"BEOOOWS9", "BUFD099D"};
		String[] extended_amount = new String[] {"4.00", "6.00"};

		/************************ Miscellaneous Variables **********************/

		String email = "T.Harris@ChicagoBears.com";
		String instructions = "Must arrive before opening day at Lambeau";

		/*********************** Transaction Object *******************************/

		ReAuth reauth = new ReAuth ();
		reauth.setOrderId(order_id);
		reauth.setCustId(cust_id);
		reauth.setAmount(amount);
		reauth.setOrigOrderId(orig_order_id);
		reauth.setTxnNumber(txn_number);
		reauth.setCryptType(crypt);

		/*********************** Billing/Shipping Object **************************/

		BillingLocation billingAddress =
				new BillingLocation  (last_name, first_name, company_name, address,
						city, province, zip_code, country, phone_number,
						fax, tax1, tax2, tax3, shipping_cost);

		ShippingLocation shippingAddress =
				new ShippingLocation  (last_name, first_name, company_name, address,
						city, province, zip_code, country, phone_number,
						fax, tax1, tax2, tax3, shipping_cost);

		/************************ Line Item Object ************************************/

		Item[] lineItems = new Item[]{new Item(name[0], quantity[0], product_code[0], extended_amount[0]),
				new Item(name[1], quantity[1], product_code[1], extended_amount[1])};


		/************************* Customer Information Object *************************/

		CustomerInfo custData =
				new CustomerInfo (billingAddress, shippingAddress, email, instructions, lineItems);


		reauth.setCustInfo (custData);

		
		HttpsPostRequest mpgReq = new HttpsPostRequest();
		mpgReq.setProcCountryCode(processing_country_code);
		mpgReq.setTestMode(true); //false or comment out this line for production transactions
		mpgReq.setStoreId(store_id);
		mpgReq.setApiToken(api_token);
		mpgReq.setTransaction(reauth);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("BankTotals = " + receipt.getBankTotals());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Ticket = " + receipt.getTicket());
			System.out.println("TimedOut = " + receipt.getTimedOut());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
} 

                

Re-Authorization transaction object definition

ReAuth reauth = new ReAuth();

HttpsPostRequest object for Re-Authorization transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(reauth);

Re-Authorization with Customer Info mandatory values

Value Type Limits Set method Description
Order ID String 50-character alphanumeric reauth.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every Purchase, PreAuth and Independent Refund transaction. No two transactions of these types may have the same order ID.

For Refund, Completion and Purchase Correction transactions, the order ID must be the same as that of the original transaction.

The last 10 characters of the order ID are displayed in the “Invoice Number” field on the Merchant Direct Reports. However only letters, numbers and spaces are sent to Merchant Direct.

A minimum of 3 and a maximum of 10 valid characters are sent to Merchant Direct. Only the last characters beginning after any invalid characters are sent. For example, if the order ID is 1234-567890, only 567890 is sent to Merchant Direct.

If the order ID has fewer than 3 characters, it may display a blank or 0000000000 in the Invoice Number field.
Original order ID String 50-character alphanumeric reauth.setOrigOrderId(orig_order_id); Order ID of the Risk transaction to be asserted.
Amount String 9-character numeric reauth.setAmount(amount); Transaction amount. Used in a number of transactions. Note that this is different from the amount used in a Completion transaction, which is an alphanumeric value.

This must contain at least 3 digits, two of which are penny values.

The minimum allowable value is $0.01, and the maximum allowable value is 999 999.99. Transaction amounts of $0.00 are not allowed.
Transaction number String 255-character alphanumeric reauth.setTxnNumber(txn_number); Used when performing follow-on transactions. (That is, Completion, Purchase Correction or Refund.) This must be the value that was returned as the transaction number in the response of the original transaction.

When performing a Completion, this value must reference the Pre-Authorization. When performing a Refund or a Purchase Correction, this value must reference the Completion or the Purchase.
E-Commerce indicator String 1-character alphanumeric reauth.setCryptType(crypt); 1: Mail Order / Telephone Order—Single
2: Mail Order / Telephone Order—Recurring
3: Mail Order / Telephone Order—Instalment
4: Mail Order / Telephone Order—Unknown classification
5: Authenticated e-commerce transaction (VBV)
6: Non-authenticated e-commerce transaction (VBV)
7: SSL-enabled merchant
8: Non-secure transaction (web- or email-based)
9: SET non-authenticated transaction
Customer Information Object Not applicable. reauth.setCustInfo(customer);

Re-Authorization with Customer Info optional values

Value Type Limits Set method Description
Customer ID String 50-character alphanumeric reauth.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number and so on.

This field is searchable from the Moneris Merchant Resource Centre.
Dynamic Descriptor String 20-character alphanumeric reauth.setDynamicDescriptor(dynamic_descriptor); Merchant-defined description sent on a per-transaction basis that will appear on the credit card statement appended to the merchant’s business name.
AVS Object Not applicable. reauth.setAvsInfo(avsCheck);
CVD Object Not applicable. reauth.setCvdInfo(cvdCheck);

Predecessors
  • Partial Completion
Successors
  • Tokenize
  • Completion

Re-Authorization with CVD & AVS

The Card Validation Digits (CVD) value refers to the numbers appearing on the back of the credit card rather than the numbers imprinted on the front. It is an optional fraud prevention tool that enables merchants to verify data provided by the cardholder at transaction time. This data is submitted along with the transaction to the issuing bank, which provides a response indicating whether the data is a match.

The response that is received from CVD verification is intended to provide added security and fraud prevention, but the response itself does not affect the completion of a transaction. Upon receiving a response, the choice whether to proceed with a transaction is left entirely to the merchant. The response is not a strict guideline of which transaction will approve or decline.

Address Verification Service (AVS) is an optional fraud-prevention tool offered by issuing banks whereby a cardholder's address is submitted as part of the transaction authorization. The AVS address is then compared to the address kept on file at the issuing bank. AVS checks whether the street number, street name and zip/postal code match. The issuing bank returns an AVS result code indicating whether the data was matched successfully. Regardless of the AVS result code returned, the credit card is authorized or declined by the issuing bank.

The response that is received from AVS verification is intended to provide added security and fraud prevention, but the response itself does not affect the completion of a transaction. Upon receiving a response, the choice to proceed with a transaction is left entirely to the merchant. The responses is not a strict guideline of whether a transaction will be approved or declined.

Things to consider:

  • CVD is only supported by Visa, MasterCard and American Express.
  • AVS is only supported by Visa, MasterCard, Discover and American Express.
  • When testing CVD or AVS, you must only use the Visa test card numbers 4242424242424242 or 4005554444444403, and the amounts described in the Simulator eFraud Response Codes Table
  • For a full list of possible AVS & CVD result codes refer to the CVD and AVS Result Code tables

Security: The CVD value must only be passed to the payment gateway. Under no circumstances may it be stored for subsequent uses or displayed as part of the receipt information.

Canada Code Sample

package Canada;
import JavaAPI.*;

public class TestCanadaReAuthEfraud
{
	public static void main(String args[])
	{
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();
	
		String store_id = "moneris";
		String api_token = "hurgle";
		String cust_id = "Hilton_1";
		String amount = "1.00";
		String orig_order_id = "mvt3215289259";
		String txn_number = "200152-0_10";
		String crypt = "7";
		String processing_country_code = "CA";

		AvsInfo avs = new AvsInfo ("123", "Edgar Street", "M1M1M1");
		CvdInfo cvd = new CvdInfo ("1", "099");

		/*********************** Transaction Object *******************************/
		ReAuth reauth = new ReAuth ();
		reauth.setOrderId(order_id);
		reauth.setCustId(cust_id);
		reauth.setAmount(amount);
		reauth.setOrigOrderId(orig_order_id);
		reauth.setTxnNumber(txn_number);
		reauth.setCryptType(crypt);

		reauth.setAvsInfo(avs);
		reauth.setCvdInfo(cvd);


		HttpsPostRequest mpgReq = new HttpsPostRequest();
		mpgReq.setProcCountryCode(processing_country_code);
		mpgReq.setTestMode(true); //false or comment out this line for production transactions
		mpgReq.setStoreId(store_id);
		mpgReq.setApiToken(api_token);
		mpgReq.setTransaction(reauth);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("BankTotals = " + receipt.getBankTotals());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Ticket = " + receipt.getTicket());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("IsVisaDebit = " + receipt.getIsVisaDebit());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSAReAuthEfraud
{
	public static void main(String args[])
	{
		String store_id = "monusqa002";
		String api_token = "qatoken";

		java.util.Date createDate = new java.util.Date();
		String order_id = "Test"+createDate.getTime();
		String cust_id = "Hilton_1";
		String amount = "1.00";
		String orig_order_id = "mvt3213892328";
		String txn_number = "837958-0_25";
		String crypt = "7";
		String processing_country_code = "US";

		/********************** Efraud Variables ************************/

		AvsInfo avs = new AvsInfo ("123", "Edgar Street", "M1M1M1");
		CvdInfo cvd = new CvdInfo ("1", "099");		

		/*********************** Transaction Object *******************************/

		ReAuth reauth = new ReAuth ();
		reauth.setOrderId(order_id);
		reauth.setCustId(cust_id);
		reauth.setAmount(amount);
		reauth.setOrigOrderId(orig_order_id);
		reauth.setTxnNumber(txn_number);
		reauth.setCryptType(crypt);
		reauth.setAvsInfo(avs);
		reauth.setCvdInfo(cvd);
		
		HttpsPostRequest mpgReq = new HttpsPostRequest();
		mpgReq.setProcCountryCode(processing_country_code);
		mpgReq.setTestMode(true); //false or comment out this line for production transactions
		mpgReq.setStoreId(store_id);
		mpgReq.setApiToken(api_token);
		mpgReq.setTransaction(reauth);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("BankTotals = " + receipt.getBankTotals());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Ticket = " + receipt.getTicket());
			System.out.println("TimedOut = " + receipt.getTimedOut());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
} 

                

Re-Authorization transaction object definition

ReAuth reauth = new ReAuth();

HttpsPostRequest object for Re-Authorization transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(reauth);

Re-Authorization with CVD AVS mandatory values

Value Type Limits Set method Description
Order ID String 50-character alphanumeric reauth.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every Purchase, PreAuth and Independent Refund transaction. No two transactions of these types may have the same order ID.

For Refund, Completion and Purchase Correction transactions, the order ID must be the same as that of the original transaction.

The last 10 characters of the order ID are displayed in the “Invoice Number” field on the Merchant Direct Reports. However only letters, numbers and spaces are sent to Merchant Direct.

A minimum of 3 and a maximum of 10 valid characters are sent to Merchant Direct. Only the last characters beginning after any invalid characters are sent. For example, if the order ID is 1234-567890, only 567890 is sent to Merchant Direct.

If the order ID has fewer than 3 characters, it may display a blank or 0000000000 in the Invoice Number field.
Original order ID String 50-character alphanumeric reauth.setOrigOrderId(orig_order_id); Order ID of the Risk transaction to be asserted.
Amount String 9-character numeric reauth.setAmount(amount); Transaction amount. Used in a number of transactions. Note that this is different from the amount used in a Completion transaction, which is an alphanumeric value.

This must contain at least 3 digits, two of which are penny values.

The minimum allowable value is $0.01, and the maximum allowable value is 999 999.99. Transaction amounts of $0.00 are not allowed.
Transaction number String 255-character alphanumeric reauth.setTxnNumber(txn_number); Used when performing follow-on transactions. (That is, Completion, Purchase Correction or Refund.) This must be the value that was returned as the transaction number in the response of the original transaction.

When performing a Completion, this value must reference the Pre-Authorization. When performing a Refund or a Purchase Correction, this value must reference the Completion or the Purchase.
E-Commerce indicator String 1-character alphanumeric reauth.setCryptType(crypt); 1: Mail Order / Telephone Order—Single
2: Mail Order / Telephone Order—Recurring
3: Mail Order / Telephone Order—Instalment
4: Mail Order / Telephone Order—Unknown classification
5: Authenticated e-commerce transaction (VBV)
6: Non-authenticated e-commerce transaction (VBV)
7: SSL-enabled merchant
8: Non-secure transaction (web- or email-based)
9: SET non-authenticated transaction
Customer Information Object Not applicable. reauth.setCustInfo(customer);
AVS Object Not applicable. reauth.setAvsInfo(avsCheck);
CVD Object Not applicable. reauth.setCvdInfo(cvdCheck);

Re-Authorization with CVD AVS optional values

Value Type Limits Set method Description
Customer ID String 50-character alphanumeric reauth.setCustId(cust_id); This can be used for policy number, membership number, student ID, invoice number and so on.

This field is searchable from the Moneris Merchant Resource Centre.
Dynamic Descriptor String 20-character alphanumeric reauth.setDynamicDescriptor(dynamic_descriptor); Merchant-defined description sent on a per-transaction basis that will appear on the credit card statement appended to the merchant’s business name.

CVD & AVS Response Fields

Value Limits Get Method Description
CVD result code 2-character alphanumeric receipt.getCvdResultCode(); Indicates the CVD validation result. The first byte is the numeric CVD indicator sent in the request; the second byte is the response code. Possible response codes are shown in the CVD Result Code table.
AVS result code 1-character alphanumeric receipt.getAvsResultCode(); Indicates the address verification result. For a full list of possible response codes refer to the AVS Result Code table.

Predecessors
  • Partial Completion
Successors
  • Tokenize
  • Completion