Subversion Repositories SmartDukaan

Rev

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

Rev 29612 Rev 29625
Line 386... Line 386...
386
			int merchantOrderId = jsonOrder.getInt("merchant_order_number");
386
			int merchantOrderId = jsonOrder.getInt("merchant_order_number");
387
			String status = jsonOrder.getString("status");
387
			String status = jsonOrder.getString("status");
388
			if(merchantOrderId == paymentId && status.equals("SUCCESS") || status.equals("CAPTURED")) {
388
			if(merchantOrderId == paymentId && status.equals("SUCCESS") || status.equals("CAPTURED")) {
389
				if(orderAmount == fofoPayment.getAmount()) {
389
				if(orderAmount == fofoPayment.getAmount()) {
390
					fofoPayment.setStatus(PaymentStatus.SUCCESS);
390
					fofoPayment.setStatus(PaymentStatus.SUCCESS);
-
 
391
					fofoPayment.setAmount(capturedAmount);
391
					walletService.addAmountToWallet(uc.getUserId(), paymentId, WalletReferenceType.PAYMENT_GATEWAY, "Amount added to wallet via SD Credit via Mandii", (float)fofoPayment.getAmount(), LocalDateTime.now());
392
					walletService.addAmountToWallet(uc.getUserId(), paymentId, WalletReferenceType.PAYMENT_GATEWAY, "Amount added to wallet via SD Credit via Mandii", (float)fofoPayment.getAmount(), LocalDateTime.now());
392
					if(orderAmount == capturedAmount) {
393
					if(orderAmount == capturedAmount) {
393
						return responseSender.ok(true);
394
						return responseSender.ok(true);
394
					} 
395
					} 
395
				}
396
				}