Subversion Repositories SmartDukaan

Rev

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

Rev 2899 Rev 2907
Line 1... Line 1...
1
package in.shop2020.serving.services;
1
package in.shop2020.serving.services;
2
 
2
 
3
import in.shop2020.config.ConfigException;
-
 
4
import in.shop2020.payments.Attribute;
3
import in.shop2020.payments.Attribute;
5
import in.shop2020.payments.Payment;
4
import in.shop2020.payments.Payment;
6
import in.shop2020.payments.PaymentStatus;
5
import in.shop2020.payments.PaymentStatus;
7
import in.shop2020.payments.PaymentService.Client;
6
import in.shop2020.payments.PaymentService.Client;
8
import in.shop2020.thrift.clients.PaymentServiceClient;
7
import in.shop2020.thrift.clients.PaymentServiceClient;
9
import in.shop2020.thrift.clients.config.ConfigClient;
-
 
10
 
8
 
11
import java.util.ArrayList;
9
import java.util.ArrayList;
12
import java.util.HashMap;
10
import java.util.HashMap;
13
import java.util.List;
11
import java.util.List;
14
import java.util.Map;
12
import java.util.Map;
Line 25... Line 23...
25
	public static final String DATE_TIME = "dateTime";
23
	public static final String DATE_TIME = "dateTime";
26
	public static final String MODE = "mode";
24
	public static final String MODE = "mode";
27
	public static final String REF_NO = "referenceNo";
25
	public static final String REF_NO = "referenceNo";
28
	public static final String TXN_TYPE = "transactionType";
26
	public static final String TXN_TYPE = "transactionType";
29
	
27
	
30
    private static String accountId;
-
 
31
    private static String secretKey;
-
 
32
    
-
 
33
	static{
-
 
34
		try {
-
 
35
			accountId = ConfigClient.getClient().get("ebs_account_id");
-
 
36
			secretKey = ConfigClient.getClient().get("ebs_secret_key");
-
 
37
		} catch (ConfigException e) {
-
 
38
			log.error("Unable to get EBS payment configuration.");
-
 
39
		}
-
 
40
	}
-
 
41
	
-
 
42
	private static int gatewayId=2;
28
    private static int gatewayId=2;
43
	private long paymentId;
29
	private long paymentId;
44
	
30
	
45
	@Override
31
	@Override
46
	public long createPayment(long currentCartId, long userId, long txnId, String paymentOption){
32
	public long createPayment(long currentCartId, long userId, long txnId, String paymentOption){
47
		log.info("Creating payment for the txn#: " + txnId + " for the user: " + userId + " for processing through EBS");
33
		log.info("Creating payment for the txn#: " + txnId + " for the user: " + userId + " for processing through EBS");