Ensuring synchronization between PolicyCenter and the payment gateway

The standard processing of a successful request to the payment gateway deletes the PaymentGatewayTransaction entity instance that identifies the request after updating the up-front payment information on the job. The Payment screen updates the list of payments and the outstanding payment information. On entry to the Payment screen, PolicyCenter checks for existing PaymentGatewayTransaction entity instances and displays a Synchronize button and a message requesting synchronization. The action that the Synchronize button takes is to call the inquiryPaymentGatewayTransaction plugin method. Implement this method to check the status of the payment request that relates to the PaymentGatewayTransaction entity instance. This method takes the Reference property of the transaction as a String argument and returns an object that implements the PaymentGatewayResponse interface. The response processor updates the PaymentGatewayTransaction, Job, and UpFrontPayment entity instances.