This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CKEDITOR_SETTINGS = { | |
# 'language': '{{ language }}', | |
# 'toolbar': 'CMS', | |
# 'skin': 'moono', | |
# 'toolbar_CMS': [ | |
# ['Undo', 'Redo'], | |
# ['cmsplugins', '-', 'ShowBlocks'], | |
# ['Format', 'Styles'], | |
# ['TextColor', 'BGColor', '-', 'PasteText', 'PasteFromWord'], | |
# ['Maximize', ''], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CKEDITOR_SETTINGS = { | |
# 'language': '{{ language }}', | |
# 'toolbar': 'CMS', | |
# 'skin': 'moono', | |
# 'toolbar_CMS': [ | |
# ['Undo', 'Redo'], | |
# ['cmsplugins', '-', 'ShowBlocks'], | |
# ['Format', 'Styles'], | |
# ['TextColor', 'BGColor', '-', 'PasteText', 'PasteFromWord'], | |
# ['Maximize', ''], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TDES { | |
public static void main(String[] args) throws Exception { | |
String text = "cleopatra douglas"; | |
byte[] codedtext = new TripleDESTest().encrypt(text); | |
String decodedtext = new TripleDESTest().decrypt(codedtext); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.crypto.Cipher; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
import org.apache.commons.codec.binary.Base64; | |
public class Encryptor { | |
public static String encrypt(String key, String initVector, String value) { | |
try { | |
IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class mobileMoney implements RequestHandler<mobilemoneyPayload, String> { | |
@POST | |
@Consumes({MediaType.APPLICATION_JSON}) | |
@Produces(MediaType.APPLICATION_JSON) | |
public String handleRequest(mobilemoneyPayload mobilemoneyPayload, Context context) { | |
PaymentServices paymentservices = new PaymentServices(); | |
// ReferenceUtil referenceutil = new ReferenceUtil(); | |
InetAddress localhost = null; | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String doflwmobilemoney(String params) { | |
StringBuilder result = new StringBuilder(); | |
try (CloseableHttpClient client = HttpClientBuilder.create().build()) { | |
HttpPost post = new HttpPost((raveConfig.SANDBOXMOBILEMONEY_CHARGE_URL)); | |
LOG.info("doflwmobilemoney response ::: " + params); | |
System.out.println("params ===>" + params); | |
pay_load pay_load = new pay_load(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static final String SANBOX_URL = System.getenv("SANBOX_URL"); | |
public static final String SECRET_KEY = System.getenv("SECRET_KEY"); | |
public static final String PUBLIC_KEY = System.getenv("PUBLIC_KEY"); | |
public static final String ENCRYPTION_KEY = System.getenv("ENCRYPTION_KEY"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public long givenUsingPlainJava_whenGeneratingRandomLongBounded_thenCorrect() { | |
long leftLimit = 10000000000L; | |
long rightLimit = 1000L; | |
long generatedLong = leftLimit + (long) (Math.random() * (rightLimit - leftLimit)); | |
return generatedLong; | |
} | |
public long generateRandomCard() { | |
long card = this.givenUsingPlainJava_whenGeneratingRandomLongBounded_thenCorrect(); | |
return card; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"method": "$context.httpMethod", | |
"body" : $input.json('$'), | |
"headers": { | |
#foreach($param in $input.params().header.keySet()) | |
"$param": "$util.escapeJavaScript($input.params().header.get($param))" | |
#if($foreach.hasNext),#end | |
#end | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ImplementHeader implements RequestHandler<Map<String, Object>, NameEnquiryResponse> { | |
public String handleRequest(Map<String, Object> eventMap, Context context) { | |
context.getLogger().log("Header: " + eventMap.get("headers")); | |
context.getLogger().log("Input: " + eventMap.get("body")); | |
Gson gson = new Gson(); | |
String json = gson.toJson(eventMap.get("body")); | |
String jsonHeader = gson.toJson(eventMap.get("headers")); |