File: VoidSaleCommand.java

package info (click to toggle)
libjdepend-java 2.9-5
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 820 kB
  • ctags: 782
  • sloc: java: 3,873; xml: 549; makefile: 7; sh: 6
file content (41 lines) | stat: -rw-r--r-- 1,020 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package epayment.commands;

import epayment.framework.*;

/**
 * The <code>VoidSaleCommand</code> class is an
 * <code>AbstractPaymentCommand</code> for voiding
 * a previous sale.
 * <p>
 * This class is strictly an example.
 *
 * @author <a href="mailto:mike@clarkware.com">Mike Clark</a>
 * @author <a href="http://www.clarkware.com">Clarkware Consulting</a>
 */

public class VoidSaleCommand extends AbstractPaymentCommand {

	/**
	 * Constructs an <code>VoidSaleCommand</code> with
	 * the specified payment request.
	 *
	 * @param request Payment request.
	 */
	public VoidSaleCommand(IPaymentRequest request) {
		super(request);
	}
	
	/**
	 * Executes this command using the specified payment 
	 * adapter and returns a payment response.
	 *
	 * @param adapter Payment adapter.
	 * @return response Payment response.
	 * @throws PaymentException If an error occurs.
	 */
	public IPaymentResponse execute(IGatewayAdapter adapter)
		throws PaymentException {
		
		return adapter.voidSale(getPaymentRequest());
	}
}