Subversion Repositories SmartDukaan

Rev

Rev 3724 | Rev 4008 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3724 Rev 3956
Line 14... Line 14...
14
enum PaymentStatus{
14
enum PaymentStatus{
15
	INIT,
15
	INIT,
16
	PENDING,
16
	PENDING,
17
	SUCCESS,	// HDFC Status: CAPTURED; EBS Status: Captured
17
	SUCCESS,	// HDFC Status: CAPTURED; EBS Status: Captured
18
	FAILED,		// HDFC status: NOT CAPTURED, DENIED BY RISK, HOST TIMEOUT, CANCELLED
18
	FAILED,		// HDFC status: NOT CAPTURED, DENIED BY RISK, HOST TIMEOUT, CANCELLED
19
	AUTHORIZED  // EBS Status: Pending
19
	AUTHORIZED,  // EBS Status: Pending, HDFC Status: APPROVED
-
 
20
	PARTIALLY_CAPTURED //In case of COD
20
}
21
}
21
 
22
 
22
// If new paymethod is added here, sales database for pentaho must also be updated.
23
// If new paymethod is added here, sales database for pentaho must also be updated.
23
const map<string,string> PAYMENT_METHOD = {
24
const map<string,string> PAYMENT_METHOD = {
24
	'1001' : 'EBS-TEST Payment'
25
	'1001' : 'EBS-TEST Payment'
Line 185... Line 186...
185
	
186
	
186
	/**
187
	/**
187
	Capture the payment for the given merchant transaction id. It processes the last payment for the given
188
	Capture the payment for the given merchant transaction id. It processes the last payment for the given
188
	transaction. If the capture attempt failed, the payment is marked as failed.
189
	transaction. If the capture attempt failed, the payment is marked as failed.
189
	*/
190
	*/
190
	bool capturePayment(1:i64 merchantTxnId) throws (1:PaymentException pe)
191
	bool capturePayment(1:i64 merchantTxnId) throws (1:PaymentException pe),
-
 
192
	
-
 
193
	/**
-
 
194
	Adds the given amount to the captured amount of a COD payment.
-
 
195
	Updates the captured amount for the corresponding payment and marks it as PARTIALLY CAPTURED.
-
 
196
	If the captured amount becomes equal to total amount, then the payment status is set as SUCCESS.
-
 
197
	Also sets the name of the entity which transferred the money, the date on which it was transferred
-
 
198
	and the corresponding transaction id.
-
 
199
	
-
 
200
	Returns false if the payment couldn't be captured.
-
 
201
	Throws exception if no such payment could be found or if the captured amount will exceed the total amount after capturing.
-
 
202
	*/
-
 
203
	bool partiallyCapturePayment(1:i64 merchantTxnId, 2:double amount, 3:string xferBy, 4:string xferTxnId, 5:i64 xferDate) throws (1:PaymentException pe)
191
}
204
}
192
205