79115cdb5c24ebacfe9f801309aa5b002ffb6894..52ab0d284c5eb8b5429f24e4996a40f945d5b61d
2018-08-22 Permana
update
52ab0d diff | tree
2018-08-22 Permana
update
cc9455 diff | tree
25 files modified
26 files added
2 files renamed
10 files deleted
1 files copied
2898 ■■■■■ changed files
.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_4.xml 8 ●●●● patch | view | raw | blame | history
.idea/libraries/Maven__id_co_accessmobile_payment_gateway_payment_gateway_database_service_1_0.xml 15 ●●●●● patch | view | raw | blame | history
.idea/libraries/Maven__id_co_accessmobile_payment_gateway_payment_gateway_tools_1_0.xml 15 ●●●●● patch | view | raw | blame | history
.idea/libraries/Maven__org_springframework_boot_spring_boot_devtools_1_5_2_RELEASE.xml 13 ●●●●● patch | view | raw | blame | history
doc/product/pulsa/indosat.json 117 ●●●●● patch | view | raw | blame | history
doc/product/pulsa/mobile_transaction.json 31 ●●●●● patch | view | raw | blame | history
doc/product/pulsa/smartfren.json 73 ●●●●● patch | view | raw | blame | history
doc/product/pulsa/telkomsel.json 106 ●●●●● patch | view | raw | blame | history
doc/product/pulsa/tri.json 73 ●●●●● patch | view | raw | blame | history
doc/product/pulsa/xl.json 106 ●●●●● patch | view | raw | blame | history
ignore_untracked_file.sh 1 ●●●● patch | view | raw | blame | history
payment-gateway.iml 82 ●●●●● patch | view | raw | blame | history
payment_gateway_api_service/payment-gateway-api-service.iml 83 ●●●●● patch | view | raw | blame | history
payment_gateway_api_service/pom.xml 9 ●●●●● patch | view | raw | blame | history
payment_gateway_api_service/src/main/java/id/co/accessmobile/payment/gateway/api/apis/Apis.java 126 ●●●● patch | view | raw | blame | history
payment_gateway_api_service/src/main/resources/application-dev.properties 19 ●●●● patch | view | raw | blame | history
payment_gateway_api_service/src/main/resources/application-prod.properties 23 ●●●●● patch | view | raw | blame | history
payment_gateway_api_service/src/main/resources/application.properties 41 ●●●●● patch | view | raw | blame | history
payment_gateway_api_service/src/main/resources/logback-spring.xml 65 ●●●●● patch | view | raw | blame | history
payment_gateway_database_service/payment-gateway-database-service.iml 61 ●●●●● patch | view | raw | blame | history
payment_gateway_database_service/pom.xml 13 ●●●●● patch | view | raw | blame | history
payment_gateway_database_service/src/main/java/id/co/accessmobile/payment/gateway/database/entity/TblQueueOut.java 2 ●●● patch | view | raw | blame | history
payment_gateway_database_service/src/main/java/id/co/accessmobile/payment/gateway/database/entity/TblTransaction.java 2 ●●● patch | view | raw | blame | history
payment_gateway_database_service/src/main/java/id/co/accessmobile/payment/gateway/database/repository/ProductRepository.java 2 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment-gateway-merchant-list.iml 60 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln.iml 60 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln_axes_pay/payment-gateway-merchant-pln-axes-pay.iml 65 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln_axes_pay/src/main/java/id/co/accessmobile/payment/gateway/merchant/pln/axes_pay/service/PLNPOSTpaid.java 11 ●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln_axes_pay/src/main/java/id/co/accessmobile/payment/gateway/merchant/pln/axes_pay/service/PLNPrepaid.java 12 ●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln_axes_pay/src/main/resources/application-dev.properties 27 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln_axes_pay/src/main/resources/application-prod.properties 25 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln_axes_pay/src/main/resources/application.properties 37 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln_axes_pay/src/main/resources/logback-spring.xml 65 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment-gateway-merchant-pulsa.iml 60 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/pom.xml 45 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/Application.java 109 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/model/CallbackResponse.java 23 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/model/RequestMobile.java 14 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/model/ResponseMobileInquirePostpaid.java 20 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/model/ResponseMobileTransaction.java 24 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/model/ResponseProductID.java 20 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/service/data/Data.java 141 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/service/pulsa/POSTpaid.java 206 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/service/pulsa/PREpaid.java 140 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/resources/application.properties 26 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/resources/logback-spring.xml 18 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/payment-gateway-merchant-pulsa-triversa.iml 47 ●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/pom.xml 5 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/triversa/services/ResponseCallback.java 19 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/triversa/services/data/Data.java 19 ●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/triversa/services/pulsa/POSTpaid.java 42 ●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/triversa/services/pulsa/PREpaid.java 21 ●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/resources/application-dev.properties 30 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/resources/application.properties 31 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/resources/logback-spring.xml 26 ●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/resources/logback-spring2.xml 65 ●●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/pom.xml 1 ●●●● patch | view | raw | blame | history
payment_gateway_merchant_list/pom.xml 9 ●●●●● patch | view | raw | blame | history
payment_gateway_model/payment-gateway-model.iml 73 ●●●● patch | view | raw | blame | history
payment_gateway_tools/payment-gateway-tools.iml 60 ●●●●● patch | view | raw | blame | history
payment_gateway_tools/src/main/java/id/co/accessmobile/adzanreminder/hutch/tools/Tools.java 71 ●●●● patch | view | raw | blame | history
payment_gateway_trigger_service/payment-gateway-trigger-service.iml 62 ●●●●● patch | view | raw | blame | history
payment_gateway_trigger_service/pom.xml 2 ●●● patch | view | raw | blame | history
pom.xml 21 ●●●●● patch | view | raw | blame | history
.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_0.xml
similarity index 68%rename from .idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_0.xmlrename to .idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_4.xml
....@@ -1,13 +1,13 @@
11 <component name="libraryTable">
2
- <library name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.0">
2
+ <library name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.4">
33 <CLASSES>
4
- <root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar!/" />
4
+ <root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.9.4/jackson-core-2.9.4.jar!/" />
55 </CLASSES>
66 <JAVADOC>
7
- <root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0-javadoc.jar!/" />
7
+ <root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.9.4/jackson-core-2.9.4-javadoc.jar!/" />
88 </JAVADOC>
99 <SOURCES>
10
- <root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0-sources.jar!/" />
10
+ <root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.9.4/jackson-core-2.9.4-sources.jar!/" />
1111 </SOURCES>
1212 </library>
1313 </component>
.idea/libraries/Maven__id_co_accessmobile_payment_gateway_payment_gateway_database_service_1_0.xml
....@@ -0,0 +1,15 @@
1
+<component name="libraryTable">
2
+ <library name="Maven: id.co.accessmobile.payment.gateway:payment-gateway-database-service:1.0">
3
+ <CLASSES>
4
+ <root url="jar://$MAVEN_REPOSITORY$/id/co/accessmobile/payment/gateway/payment-gateway-database-service/1.0/payment-gateway-database-service-1.0.jar!/" />
5
+ </CLASSES>
6
+ <JAVADOC>
7
+ <root url="jar://$PROJECT_DIR$/payment_gateway_database_service/payment-gateway-database-service-1.0-javadoc.jar!/" />
8
+ <root url="jar://$MAVEN_REPOSITORY$/id/co/accessmobile/payment/gateway/payment-gateway-database-service/1.0/payment-gateway-database-service-1.0-javadoc.jar!/" />
9
+ </JAVADOC>
10
+ <SOURCES>
11
+ <root url="jar://$PROJECT_DIR$/payment_gateway_database_service/payment-gateway-database-service-1.0-sources.jar!/" />
12
+ <root url="jar://$MAVEN_REPOSITORY$/id/co/accessmobile/payment/gateway/payment-gateway-database-service/1.0/payment-gateway-database-service-1.0-sources.jar!/" />
13
+ </SOURCES>
14
+ </library>
15
+</component>
.idea/libraries/Maven__id_co_accessmobile_payment_gateway_payment_gateway_tools_1_0.xml
....@@ -0,0 +1,15 @@
1
+<component name="libraryTable">
2
+ <library name="Maven: id.co.accessmobile.payment.gateway:payment-gateway-tools:1.0">
3
+ <CLASSES>
4
+ <root url="jar://$MAVEN_REPOSITORY$/id/co/accessmobile/payment/gateway/payment-gateway-tools/1.0/payment-gateway-tools-1.0.jar!/" />
5
+ </CLASSES>
6
+ <JAVADOC>
7
+ <root url="jar://$PROJECT_DIR$/payment_gateway_tools/payment-gateway-tools-1.0-javadoc.jar!/" />
8
+ <root url="jar://$MAVEN_REPOSITORY$/id/co/accessmobile/payment/gateway/payment-gateway-tools/1.0/payment-gateway-tools-1.0-javadoc.jar!/" />
9
+ </JAVADOC>
10
+ <SOURCES>
11
+ <root url="jar://$PROJECT_DIR$/payment_gateway_tools/payment-gateway-tools-1.0-sources.jar!/" />
12
+ <root url="jar://$MAVEN_REPOSITORY$/id/co/accessmobile/payment/gateway/payment-gateway-tools/1.0/payment-gateway-tools-1.0-sources.jar!/" />
13
+ </SOURCES>
14
+ </library>
15
+</component>
.idea/libraries/Maven__org_springframework_boot_spring_boot_devtools_1_5_2_RELEASE.xml
deleted file mode 100644
....@@ -1,13 +0,0 @@
1
-<component name="libraryTable">
2
- <library name="Maven: org.springframework.boot:spring-boot-devtools:1.5.2.RELEASE">
3
- <CLASSES>
4
- <root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-devtools/1.5.2.RELEASE/spring-boot-devtools-1.5.2.RELEASE.jar!/" />
5
- </CLASSES>
6
- <JAVADOC>
7
- <root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-devtools/1.5.2.RELEASE/spring-boot-devtools-1.5.2.RELEASE-javadoc.jar!/" />
8
- </JAVADOC>
9
- <SOURCES>
10
- <root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-devtools/1.5.2.RELEASE/spring-boot-devtools-1.5.2.RELEASE-sources.jar!/" />
11
- </SOURCES>
12
- </library>
13
-</component>
doc/product/pulsa/indosat.json
....@@ -0,0 +1,117 @@
1
+{
2
+ "self": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=indosat",
3
+ "first": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=indosat&page=0",
4
+ "last": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=indosat&page=0",
5
+ "list": [
6
+ {
7
+ "field_paket_data": false,
8
+ "field_denom": "50000.00",
9
+ "product_id": "5",
10
+ "type": "mobile",
11
+ "label": "Indosat Rp 50.000",
12
+ "operator": "indosat",
13
+ "nominal": "50000",
14
+ "price": 49000,
15
+ "enabled": "1"
16
+ },
17
+ {
18
+ "field_paket_data": false,
19
+ "field_denom": "100000.00",
20
+ "product_id": "6",
21
+ "type": "mobile",
22
+ "label": "Indosat Rp 100.000",
23
+ "operator": "indosat",
24
+ "nominal": "100000",
25
+ "price": 110000,
26
+ "enabled": "0"
27
+ },
28
+ {
29
+ "field_paket_data": false,
30
+ "field_denom": "5000.00",
31
+ "product_id": "17",
32
+ "type": "mobile",
33
+ "label": "Indosat Rp 5.000",
34
+ "operator": "indosat",
35
+ "nominal": "5000",
36
+ "price": 5000,
37
+ "enabled": "1"
38
+ },
39
+ {
40
+ "field_paket_data": false,
41
+ "field_denom": "10000.00",
42
+ "product_id": "18",
43
+ "type": "mobile",
44
+ "label": "Indosat Rp 10.000",
45
+ "operator": "indosat",
46
+ "nominal": "10000",
47
+ "price": 10000,
48
+ "enabled": "1"
49
+ },
50
+ {
51
+ "field_paket_data": false,
52
+ "field_denom": "150000.00",
53
+ "product_id": "28",
54
+ "type": "mobile",
55
+ "label": "Indosat Rp 150.000",
56
+ "operator": "indosat",
57
+ "nominal": "150000",
58
+ "price": 150000,
59
+ "enabled": "1"
60
+ },
61
+ {
62
+ "field_paket_data": true,
63
+ "field_denom": "60000.00",
64
+ "product_id": "81",
65
+ "type": "mobile",
66
+ "label": "Indosat Freedom Internet Plus 2Gb",
67
+ "operator": "indosat",
68
+ "nominal": "2",
69
+ "price": 60000,
70
+ "enabled": "1"
71
+ },
72
+ {
73
+ "field_paket_data": true,
74
+ "field_denom": "40000.00",
75
+ "product_id": "88",
76
+ "type": "mobile",
77
+ "label": "Indosat Freedom Internet Plus 1Gb",
78
+ "operator": "indosat",
79
+ "nominal": "1",
80
+ "price": 40000,
81
+ "enabled": "1"
82
+ },
83
+ {
84
+ "field_paket_data": true,
85
+ "field_denom": "49000.00",
86
+ "product_id": "89",
87
+ "type": "mobile",
88
+ "label": "Indosat Data Freedom Paket M",
89
+ "operator": "indosat",
90
+ "nominal": "49000",
91
+ "price": 49000,
92
+ "enabled": "1"
93
+ },
94
+ {
95
+ "field_paket_data": false,
96
+ "field_denom": "25000.00",
97
+ "product_id": "97",
98
+ "type": "mobile",
99
+ "label": "Indosat Rp 25.000",
100
+ "operator": "indosat",
101
+ "nominal": "25000",
102
+ "price": 25000,
103
+ "enabled": "1"
104
+ },
105
+ {
106
+ "field_paket_data": true,
107
+ "field_denom": "250000.00",
108
+ "product_id": "134",
109
+ "type": "mobile",
110
+ "label": "Freedom Data Roaming 3 hari Zona 1 Asia Australia",
111
+ "operator": "indosat",
112
+ "nominal": "250000",
113
+ "price": 250000,
114
+ "enabled": "1"
115
+ }
116
+ ]
117
+}
doc/product/pulsa/mobile_transaction.json
....@@ -0,0 +1,31 @@
1
+{
2
+ "request": {
3
+ "customer_number": "081234567890",
4
+ "product_id": 99,
5
+ "order_id": "ORDER-001"
6
+ },
7
+ "response": {
8
+ "transaction_id": "1",
9
+ "type": "mobile",
10
+ "created": "1473332820",
11
+ "changed": "1473332820",
12
+ "customer_number": "08123456789",
13
+ "order_id": "ORDER-001",
14
+ "price": "5000",
15
+ "status": "pending",
16
+ "response_code": "10",
17
+ "serial_number": "0041000804201970",
18
+ "amount": "",
19
+ "product_id": {
20
+ "product_id": "99",
21
+ "type": "mobile",
22
+ "label": "Telkomsel Rp 100.000",
23
+ "operator": "telkomsel",
24
+ "nominal": "100000",
25
+ "price": 99500,
26
+ "enabled": "1",
27
+ "field_denom": "100000.00",
28
+ "field_paket_data": true
29
+ }
30
+ }
31
+}
doc/product/pulsa/smartfren.json
....@@ -0,0 +1,73 @@
1
+{
2
+ "self": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=smartfren",
3
+ "first": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=smartfren&page=0",
4
+ "last": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=smartfren&page=0",
5
+ "list": [
6
+ {
7
+ "field_paket_data": false,
8
+ "field_denom": "50000.00",
9
+ "product_id": "7",
10
+ "type": "mobile",
11
+ "label": "Smartfren Rp50,000",
12
+ "operator": "smartfren",
13
+ "nominal": "50000",
14
+ "price": 48000,
15
+ "enabled": "1"
16
+ },
17
+ {
18
+ "field_paket_data": false,
19
+ "field_denom": "100000.00",
20
+ "product_id": "8",
21
+ "type": "mobile",
22
+ "label": "Smartfren Rp 100.000",
23
+ "operator": "smartfren",
24
+ "nominal": "100000",
25
+ "price": 100000,
26
+ "enabled": "1"
27
+ },
28
+ {
29
+ "field_paket_data": false,
30
+ "field_denom": "5000.00",
31
+ "product_id": "19",
32
+ "type": "mobile",
33
+ "label": "Smartfren Rp 5.000",
34
+ "operator": "smartfren",
35
+ "nominal": "5000",
36
+ "price": 5000,
37
+ "enabled": "1"
38
+ },
39
+ {
40
+ "field_paket_data": false,
41
+ "field_denom": "10000.00",
42
+ "product_id": "20",
43
+ "type": "mobile",
44
+ "label": "Smartfren Rp 10.000",
45
+ "operator": "smartfren",
46
+ "nominal": "10000",
47
+ "price": 10000,
48
+ "enabled": "1"
49
+ },
50
+ {
51
+ "field_paket_data": true,
52
+ "field_denom": "60000.00",
53
+ "product_id": "101",
54
+ "type": "mobile",
55
+ "label": "SP AJAIB",
56
+ "operator": "smartfren",
57
+ "nominal": "60",
58
+ "price": 10000,
59
+ "enabled": "1"
60
+ },
61
+ {
62
+ "field_paket_data": true,
63
+ "field_denom": "100000.00",
64
+ "product_id": "103",
65
+ "type": "mobile",
66
+ "label": "SP AJAIB 100",
67
+ "operator": "smartfren",
68
+ "nominal": "100",
69
+ "price": 100000,
70
+ "enabled": "1"
71
+ }
72
+ ]
73
+}
doc/product/pulsa/telkomsel.json
....@@ -0,0 +1,106 @@
1
+{
2
+ "self": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=telkomsel",
3
+ "first": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=telkomsel&page=0",
4
+ "last": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=telkomsel&page=0",
5
+ "list": [
6
+ {
7
+ "field_paket_data": false,
8
+ "field_denom": "50000.00",
9
+ "product_id": "9",
10
+ "type": "mobile",
11
+ "label": "Telkomsel Rp 50,000",
12
+ "operator": "telkomsel",
13
+ "nominal": "50000",
14
+ "price": 47500,
15
+ "enabled": "1"
16
+ },
17
+ {
18
+ "field_paket_data": false,
19
+ "field_denom": "100000.00",
20
+ "product_id": "10",
21
+ "type": "mobile",
22
+ "label": "Telkomsel Rp 100,000",
23
+ "operator": "telkomsel",
24
+ "nominal": "100000",
25
+ "price": 120000,
26
+ "enabled": "1"
27
+ },
28
+ {
29
+ "field_paket_data": false,
30
+ "field_denom": "5000.00",
31
+ "product_id": "21",
32
+ "type": "mobile",
33
+ "label": "Telkomsel Rp 5.000",
34
+ "operator": "telkomsel",
35
+ "nominal": "5000",
36
+ "price": 6000,
37
+ "enabled": "1"
38
+ },
39
+ {
40
+ "field_paket_data": false,
41
+ "field_denom": "10000.00",
42
+ "product_id": "22",
43
+ "type": "mobile",
44
+ "label": "Telkomsel Rp 10.000",
45
+ "operator": "telkomsel",
46
+ "nominal": "10000",
47
+ "price": 12000,
48
+ "enabled": "1"
49
+ },
50
+ {
51
+ "field_paket_data": false,
52
+ "field_denom": "20000.00",
53
+ "product_id": "35",
54
+ "type": "mobile",
55
+ "label": "Telkomsel Rp 20.000",
56
+ "operator": "telkomsel",
57
+ "nominal": "20000",
58
+ "price": 20500,
59
+ "enabled": "1"
60
+ },
61
+ {
62
+ "field_paket_data": true,
63
+ "field_denom": "100000.00",
64
+ "product_id": "83",
65
+ "type": "mobile",
66
+ "label": "Pulsa Internet Telkomsel Rp100.000",
67
+ "operator": "telkomsel",
68
+ "nominal": "995",
69
+ "price": 100000,
70
+ "enabled": "1"
71
+ },
72
+ {
73
+ "field_paket_data": true,
74
+ "field_denom": "25000.00",
75
+ "product_id": "84",
76
+ "type": "mobile",
77
+ "label": "Pulsa Internet Telkomsel Rp25.000",
78
+ "operator": "telkomsel",
79
+ "nominal": "9910",
80
+ "price": 25000,
81
+ "enabled": "1"
82
+ },
83
+ {
84
+ "field_paket_data": true,
85
+ "field_denom": "5000.00",
86
+ "product_id": "85",
87
+ "type": "mobile",
88
+ "label": "Pulsa Internet Telkomsel Rp5.000",
89
+ "operator": "telkomsel",
90
+ "nominal": "5000",
91
+ "price": 5000,
92
+ "enabled": "1"
93
+ },
94
+ {
95
+ "field_paket_data": true,
96
+ "field_denom": "200000.00",
97
+ "product_id": "86",
98
+ "type": "mobile",
99
+ "label": "Pulsa Internet Telkomsel Rp200.000",
100
+ "operator": "telkomsel",
101
+ "nominal": "99910",
102
+ "price": 200000,
103
+ "enabled": "1"
104
+ }
105
+ ]
106
+}
doc/product/pulsa/tri.json
....@@ -0,0 +1,73 @@
1
+{
2
+ "self": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=tri",
3
+ "first": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=tri&page=0",
4
+ "last": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=tri&page=0",
5
+ "list": [
6
+ {
7
+ "field_paket_data": false,
8
+ "field_denom": "50000.00",
9
+ "product_id": "1",
10
+ "type": "mobile",
11
+ "label": "Tri Rp50,000",
12
+ "operator": "tri",
13
+ "nominal": "50000",
14
+ "price": 48000,
15
+ "enabled": "1"
16
+ },
17
+ {
18
+ "field_paket_data": false,
19
+ "field_denom": "100000.00",
20
+ "product_id": "2",
21
+ "type": "mobile",
22
+ "label": "Tri Rp 100.000",
23
+ "operator": "tri",
24
+ "nominal": "100000",
25
+ "price": 98200,
26
+ "enabled": "1"
27
+ },
28
+ {
29
+ "field_paket_data": false,
30
+ "field_denom": "5000.00",
31
+ "product_id": "13",
32
+ "type": "mobile",
33
+ "label": "Tri Rp 5.000",
34
+ "operator": "tri",
35
+ "nominal": "5000",
36
+ "price": 5000,
37
+ "enabled": "1"
38
+ },
39
+ {
40
+ "field_paket_data": false,
41
+ "field_denom": "10000.00",
42
+ "product_id": "14",
43
+ "type": "mobile",
44
+ "label": "Tri Rp10.000",
45
+ "operator": "tri",
46
+ "nominal": "10000",
47
+ "price": 10000,
48
+ "enabled": "1"
49
+ },
50
+ {
51
+ "field_paket_data": true,
52
+ "field_denom": "0.00",
53
+ "product_id": "93",
54
+ "type": "mobile",
55
+ "label": "Trisakti Paket Data",
56
+ "operator": "tri",
57
+ "nominal": "1000",
58
+ "price": 0,
59
+ "enabled": "1"
60
+ },
61
+ {
62
+ "field_paket_data": false,
63
+ "field_denom": "10000.00",
64
+ "product_id": "126",
65
+ "type": "mobile",
66
+ "label": "Tri Test 5K-10K",
67
+ "operator": "tri",
68
+ "nominal": "10000",
69
+ "price": 10000,
70
+ "enabled": "1"
71
+ }
72
+ ]
73
+}
doc/product/pulsa/xl.json
....@@ -0,0 +1,106 @@
1
+{
2
+ "self": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=xl",
3
+ "first": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=xl&page=0",
4
+ "last": "https://horven.sumpahpalapa.com:4433/api/product?type=mobile&operator=xl&page=0",
5
+ "list": [
6
+ {
7
+ "field_paket_data": false,
8
+ "field_denom": "50000.00",
9
+ "product_id": "11",
10
+ "type": "mobile",
11
+ "label": "XL Rp. 50,000",
12
+ "operator": "xl",
13
+ "nominal": "50000",
14
+ "price": 49000,
15
+ "enabled": "1"
16
+ },
17
+ {
18
+ "field_paket_data": false,
19
+ "field_denom": "1000000.00",
20
+ "product_id": "12",
21
+ "type": "mobile",
22
+ "label": "XL Rp. 1.000.000",
23
+ "operator": "xl",
24
+ "nominal": "1000000",
25
+ "price": 1000000000,
26
+ "enabled": "1"
27
+ },
28
+ {
29
+ "field_paket_data": false,
30
+ "field_denom": "5000.00",
31
+ "product_id": "23",
32
+ "type": "mobile",
33
+ "label": "XL Rp 5.000",
34
+ "operator": "xl",
35
+ "nominal": "5000",
36
+ "price": 7000,
37
+ "enabled": "1"
38
+ },
39
+ {
40
+ "field_paket_data": true,
41
+ "field_denom": "59000.00",
42
+ "product_id": "24",
43
+ "type": "mobile",
44
+ "label": "Combo XTRA M",
45
+ "operator": "xl",
46
+ "nominal": "2",
47
+ "price": 58000,
48
+ "enabled": "1"
49
+ },
50
+ {
51
+ "field_paket_data": true,
52
+ "field_denom": "89000.00",
53
+ "product_id": "78",
54
+ "type": "mobile",
55
+ "label": "Combo XTRA L",
56
+ "operator": "xl",
57
+ "nominal": "3",
58
+ "price": 87000,
59
+ "enabled": "1"
60
+ },
61
+ {
62
+ "field_paket_data": false,
63
+ "field_denom": "10000.00",
64
+ "product_id": "90",
65
+ "type": "mobile",
66
+ "label": "XL Rp 10.000",
67
+ "operator": "xl",
68
+ "nominal": "10000",
69
+ "price": 11000,
70
+ "enabled": "1"
71
+ },
72
+ {
73
+ "field_paket_data": false,
74
+ "field_denom": "100000.00",
75
+ "product_id": "99",
76
+ "type": "mobile",
77
+ "label": "XL Rp 100.000",
78
+ "operator": "xl",
79
+ "nominal": "100000",
80
+ "price": 98000,
81
+ "enabled": "1"
82
+ },
83
+ {
84
+ "field_paket_data": true,
85
+ "field_denom": "39000.00",
86
+ "product_id": "100",
87
+ "type": "mobile",
88
+ "label": "Combo XTRA S",
89
+ "operator": "xl",
90
+ "nominal": "1",
91
+ "price": 38000,
92
+ "enabled": "1"
93
+ },
94
+ {
95
+ "field_paket_data": false,
96
+ "field_denom": "25000.00",
97
+ "product_id": "120",
98
+ "type": "mobile",
99
+ "label": "XL Rp. 25,000",
100
+ "operator": "xl",
101
+ "nominal": "25000",
102
+ "price": 25000,
103
+ "enabled": "1"
104
+ }
105
+ ]
106
+}
ignore_untracked_file.sh
....@@ -0,0 +1 @@
1
+git status --porcelain | grep '^??' | cut -c4- >> .gitignore
payment-gateway.iml
....@@ -1,6 +1,6 @@
11 <?xml version="1.0" encoding="UTF-8"?>
22 <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
3
+ <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
44 <output url="file://$MODULE_DIR$/target/classes" />
55 <output-test url="file://$MODULE_DIR$/target/test-classes" />
66 <content url="file://$MODULE_DIR$">
....@@ -9,50 +9,66 @@
99 <orderEntry type="inheritedJdk" />
1010 <orderEntry type="sourceFolder" forTests="false" />
1111 <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
12
- <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.0" level="project" />
13
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:1.5.2.RELEASE" level="project" />
12
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.4" level="project" />
13
+ <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
14
+ <orderEntry type="library" name="Maven: id.co.qhodok.tools:qhodok-tools-logger:1.0" level="project" />
1415 <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.2.RELEASE" level="project" />
1516 <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
17
+ <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.7.RELEASE" level="project" />
18
+ <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
19
+ <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.7.RELEASE" level="project" />
20
+ <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
1621 <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.2.RELEASE" level="project" />
1722 <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.2.RELEASE" level="project" />
1823 <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
1924 <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
25
+ <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.24" level="project" />
26
+ <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.24" level="project" />
2027 <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.24" level="project" />
2128 <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.24" level="project" />
2229 <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
2330 <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
24
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:1.5.2.RELEASE" level="project" />
25
- <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
26
- <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
27
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.2.RELEASE" level="project" />
28
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.11" level="project" />
29
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.11" level="project" />
30
- <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.7.RELEASE" level="project" />
31
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.0.12.Final" level="project" />
32
- <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
33
- <orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final" level="project" />
34
- <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
35
- <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
36
- <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.0.Final" level="project" />
37
- <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
38
- <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.1.Final" level="project" />
39
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-entitymanager:5.0.12.Final" level="project" />
40
- <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.2" level="project" />
41
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:1.11.1.RELEASE" level="project" />
42
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.1.RELEASE" level="project" />
43
- <orderEntry type="library" name="Maven: org.springframework:spring-orm:4.3.7.RELEASE" level="project" />
44
- <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.7.RELEASE" level="project" />
45
- <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
46
- <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.7.RELEASE" level="project" />
47
- <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.7.RELEASE" level="project" />
48
- <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.24" level="project" />
49
- <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.24" level="project" />
50
- <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.7.RELEASE" level="project" />
51
- <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.41" level="project" />
52
- <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
53
- <orderEntry type="library" name="Maven: id.co.qhodok.tools:trigger:2.0" level="project" />
31
+ <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
32
+ <orderEntry type="library" name="Maven: id.co.qhodok.tools:qhodok-tools-telegram:1.0" level="project" />
33
+ <orderEntry type="library" name="Maven: org.telegram:telegrambots:3.5" level="project" />
34
+ <orderEntry type="library" name="Maven: org.telegram:telegrambots-meta:3.5" level="project" />
35
+ <orderEntry type="library" name="Maven: com.google.inject:guice:4.1.0" level="project" />
36
+ <orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
37
+ <orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
38
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
39
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.8.7" level="project" />
40
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.8.7" level="project" />
41
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.8.7" level="project" />
42
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.7" level="project" />
43
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-json-jackson:2.25.1" level="project" />
44
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-common:2.25.1" level="project" />
45
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.bundles.repackaged:jersey-guava:2.25.1" level="project" />
46
+ <orderEntry type="library" name="Maven: org.glassfish.hk2:osgi-resource-locator:1.0.1" level="project" />
47
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.ext:jersey-entity-filtering:2.25.1" level="project" />
48
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.containers:jersey-container-grizzly2-http:2.25.1" level="project" />
49
+ <orderEntry type="library" name="Maven: org.glassfish.hk2.external:javax.inject:2.5.0-b32" level="project" />
50
+ <orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-http-server:2.3.28" level="project" />
51
+ <orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-http:2.3.28" level="project" />
52
+ <orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-framework:2.3.28" level="project" />
53
+ <orderEntry type="library" name="Maven: javax.ws.rs:javax.ws.rs-api:2.0.1" level="project" />
54
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-server:2.25.1" level="project" />
55
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-client:2.25.1" level="project" />
56
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-jaxb:2.25.1" level="project" />
57
+ <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.2" level="project" />
58
+ <orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-api:2.5.0-b32" level="project" />
59
+ <orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-utils:2.5.0-b32" level="project" />
60
+ <orderEntry type="library" name="Maven: org.glassfish.hk2.external:aopalliance-repackaged:2.5.0-b32" level="project" />
61
+ <orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-locator:2.5.0-b32" level="project" />
62
+ <orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
63
+ <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.3" level="project" />
64
+ <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.6" level="project" />
65
+ <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
66
+ <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.3" level="project" />
67
+ <orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
68
+ <orderEntry type="library" name="Maven: id.co.qhodok.tools:qhodok-tools-trigger:1.0" level="project" />
5469 <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
5570 <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
71
+ <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
5672 <orderEntry type="library" name="Maven: org.zeromq:jeromq:0.4.2" level="project" />
5773 <orderEntry type="library" name="Maven: org.zeromq:jnacl:0.1.0" level="project" />
5874 </component>
payment_gateway_api_service/payment-gateway-api-service.iml
deleted file mode 100644
....@@ -1,83 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
4
- <output url="file://$MODULE_DIR$/target/classes" />
5
- <output-test url="file://$MODULE_DIR$/target/test-classes" />
6
- <content url="file://$MODULE_DIR$">
7
- <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
- <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9
- <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10
- <excludeFolder url="file://$MODULE_DIR$/target" />
11
- </content>
12
- <orderEntry type="inheritedJdk" />
13
- <orderEntry type="sourceFolder" forTests="false" />
14
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:1.5.2.RELEASE" level="project" />
15
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.2.RELEASE" level="project" />
16
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
17
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.2.RELEASE" level="project" />
18
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.2.RELEASE" level="project" />
19
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
20
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
21
- <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.24" level="project" />
22
- <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.24" level="project" />
23
- <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
24
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
25
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:1.5.2.RELEASE" level="project" />
26
- <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.11" level="project" />
27
- <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.11" level="project" />
28
- <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.11" level="project" />
29
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.3.4.Final" level="project" />
30
- <orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
31
- <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
32
- <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.3" level="project" />
33
- <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.7" level="project" />
34
- <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
35
- <orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.7.RELEASE" level="project" />
36
- <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
37
- <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.7.RELEASE" level="project" />
38
- <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.7.RELEASE" level="project" />
39
- <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.7.RELEASE" level="project" />
40
- <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
41
- <orderEntry type="library" name="Maven: org.apache.xmlrpc:xmlrpc-client:3.1.3" level="project" />
42
- <orderEntry type="library" name="Maven: org.apache.xmlrpc:xmlrpc-common:3.1.3" level="project" />
43
- <orderEntry type="library" name="Maven: org.apache.ws.commons.util:ws-commons-util:1.0.2" level="project" />
44
- <orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
45
- <orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
46
- <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
47
- <orderEntry type="module" module-name="payment-gateway-database-service" />
48
- <orderEntry type="module" module-name="payment-gateway-model" />
49
- <orderEntry type="module" module-name="payment-gateway-tools" />
50
- <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
51
- <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.0" level="project" />
52
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:1.5.2.RELEASE" level="project" />
53
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:1.5.2.RELEASE" level="project" />
54
- <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
55
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.2.RELEASE" level="project" />
56
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.11" level="project" />
57
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.11" level="project" />
58
- <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.7.RELEASE" level="project" />
59
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.0.12.Final" level="project" />
60
- <orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final" level="project" />
61
- <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
62
- <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
63
- <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.0.Final" level="project" />
64
- <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
65
- <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.1.Final" level="project" />
66
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-entitymanager:5.0.12.Final" level="project" />
67
- <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.2" level="project" />
68
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:1.11.1.RELEASE" level="project" />
69
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.1.RELEASE" level="project" />
70
- <orderEntry type="library" name="Maven: org.springframework:spring-orm:4.3.7.RELEASE" level="project" />
71
- <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.7.RELEASE" level="project" />
72
- <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.24" level="project" />
73
- <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.24" level="project" />
74
- <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.7.RELEASE" level="project" />
75
- <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.41" level="project" />
76
- <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
77
- <orderEntry type="library" name="Maven: id.co.qhodok.tools:trigger:2.0" level="project" />
78
- <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
79
- <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
80
- <orderEntry type="library" name="Maven: org.zeromq:jeromq:0.4.2" level="project" />
81
- <orderEntry type="library" name="Maven: org.zeromq:jnacl:0.1.0" level="project" />
82
- </component>
83
-</module>
payment_gateway_api_service/pom.xml
....@@ -17,6 +17,15 @@
1717 <groupId>org.springframework.boot</groupId>
1818 <artifactId>spring-boot-starter-web</artifactId>
1919 </dependency>
20
+ <!-- database -->
21
+ <dependency>
22
+ <groupId>org.springframework.boot</groupId>
23
+ <artifactId>spring-boot-starter-data-jpa</artifactId>
24
+ </dependency>
25
+ <dependency>
26
+ <groupId>mysql</groupId>
27
+ <artifactId>mysql-connector-java</artifactId>
28
+ </dependency>
2029 <!-- https://mvnrepository.com/artifact/org.apache.xmlrpc/xmlrpc-client -->
2130 <dependency>
2231 <groupId>org.apache.xmlrpc</groupId>
payment_gateway_api_service/src/main/java/id/co/accessmobile/payment/gateway/api/apis/Apis.java
....@@ -1,9 +1,8 @@
11 package id.co.accessmobile.payment.gateway.api.apis;
22
3
-import ch.qos.logback.classic.Logger;
3
+
44 import com.google.gson.Gson;
55 import id.co.accessmobile.adzanreminder.hutch.tools.LoggerMessage;
6
-import id.co.accessmobile.adzanreminder.hutch.tools.Tools;
76 import id.co.accessmobile.payment.gateway.api.Application;
87 import id.co.accessmobile.payment.gateway.database.entity.*;
98 import id.co.accessmobile.payment.gateway.database.repository.*;
....@@ -16,6 +15,8 @@
1615 import id.co.qhodok.tools.trigger.exceptions.ConnectionDown;
1716 import id.co.qhodok.tools.trigger.processor.Publisher;
1817 import id.co.qhodok.tools.trigger.processor.Subscriber;
18
+import org.slf4j.Logger;
19
+import org.slf4j.LoggerFactory;
1920 import org.springframework.beans.factory.annotation.Autowired;
2021 import org.springframework.beans.factory.annotation.Value;
2122 import org.springframework.core.env.Environment;
....@@ -69,12 +70,6 @@
6970 @Autowired
7071 protected ProductRepository productRepository;
7172
72
- @Value("${logging.file}")
73
- protected String loggingFile;
74
-
75
- @Value("${logging.pattern}")
76
- protected String loggingPattern;
77
-
7873 @Value("${mykado.address}")
7974 protected String myKadoAddress;
8075
....@@ -84,10 +79,13 @@
8479
8580 protected HashMap<String, String> callBackMyKado;
8681 protected Logger logger;
82
+ protected Object inquiryKey = new Object();
83
+// protected Subscriber subscriber;
8784
8885 @PostConstruct
8986 public void init() throws IllegalAccessException, InstantiationException, InterruptedException {
9087 this.publisher = new Publisher(this.address);
88
+// this.subscriber = new Subscriber(this.address);
9189 this.restTemplate = new RestTemplate();
9290 Application.triggerApplication.addSubscriber(this);
9391
....@@ -96,7 +94,7 @@
9694 for (TblProductType productType : tblProductTypes) {
9795 this.callBackMyKado.put(productType.getName(), this.environment.getProperty("mykado.address." + productType.getName().toLowerCase()));
9896 }
99
- this.logger = Tools.createLogger(Apis.class, this.loggingFile, this.loggingPattern);
97
+ this.logger = LoggerFactory.getLogger(Apis.class);
10098 this.doPendingTransaction();
10199 }
102100
....@@ -113,15 +111,15 @@
113111 requestPayment.setTransactionCode(queueIn.getId());
114112 try {
115113 this.publisher.publish("PAYMENT." + queueIn.getProductType().getCode().trim(), requestPayment, State.CREATE);
116
- }catch (ConnectionDown ex){
117
- if(this.publisher.reconnect(60, 1000 * 10)){
114
+ } catch (ConnectionDown ex) {
115
+ if (this.publisher.reconnect(60, 1000 * 10)) {
118116 this.publisher.publish("PAYMENT." + queueIn.getProductType().getCode().trim(), requestPayment, State.CREATE);
119
- }else{
120
- this.logger.info(this.gson.toJson(new LoggerMessage<>("error","connection down")));
117
+ } else {
118
+ this.logger.info(this.gson.toJson(new LoggerMessage<>("error", "connection down")));
121119 }
122120 }
123121 this.logger.info(this.gson.toJson(new LoggerMessage<RequestPayment>("send PAYMENT." + queueIn.getProductType().getCode().trim(), requestPayment)));
124
- }else{
122
+ } else {
125123 queueInRepository.delete(queueIn);
126124 }
127125 }
....@@ -129,43 +127,45 @@
129127
130128 @RequestMapping(value = "/payment/postpaid", method = RequestMethod.POST)
131129 public ResponseEntity<Boolean> paymentPostPaid(@RequestBody RequestPayment requestPayment) throws Exception {
132
- this.logger.info(this.gson.toJson(new LoggerMessage<RequestPayment>("subscribe",requestPayment)));
130
+ this.logger.info(this.gson.toJson(new LoggerMessage<RequestPayment>("subscribe", requestPayment)));
133131 this.initTransaction(requestPayment, true);
134132 return new ResponseEntity<Boolean>(true, HttpStatus.OK);
135133 }
136134
137135 @RequestMapping(value = "/payment/prepaid", method = RequestMethod.POST)
138136 public ResponseEntity<Boolean> paymentPrePaid(@RequestBody RequestPayment requestPayment) throws Exception {
139
- this.logger.info(this.gson.toJson(new LoggerMessage<RequestPayment>("subscribe",requestPayment)));
137
+ this.logger.info(this.gson.toJson(new LoggerMessage<RequestPayment>("subscribe", requestPayment)));
140138 this.initTransaction(requestPayment, false);
141139 return new ResponseEntity<Boolean>(true, HttpStatus.OK);
142140 }
143141
144142 @RequestMapping(value = "/payment", method = RequestMethod.POST)
145143 public ResponseEntity<Boolean> payment(@RequestBody RequestPayment requestPayment) throws Exception {
146
- this.logger.info(this.gson.toJson(new LoggerMessage<RequestPayment>("subscribe",requestPayment)));
144
+ this.logger.info(this.gson.toJson(new LoggerMessage<RequestPayment>("subscribe", requestPayment)));
147145 this.initTransaction(requestPayment);
148146 return new ResponseEntity<Boolean>(true, HttpStatus.OK);
149147 }
150148
151149 @RequestMapping(value = "/inquiry", method = RequestMethod.POST)
152150 public ResponseEntity<String> inquiry(@RequestBody RequestInquiry inquiry) throws Exception {
153
- this.logger.info(this.gson.toJson(new LoggerMessage<RequestInquiry>("subscribe",inquiry)));
151
+ this.logger.info(this.gson.toJson(new LoggerMessage<RequestInquiry>("subscribe", inquiry)));
154152 TblProductType tblProductType = this.productTypeRepository.findOne(inquiry.getProduct());
155
- try{
153
+ try {
156154 this.publisher.publish("INQUIRY." + tblProductType.getName(), inquiry, State.CREATE);
157
- }catch (ConnectionDown ex){
158
- if(this.publisher.reconnect(60,1000*10)){
155
+ } catch (ConnectionDown ex) {
156
+ if (this.publisher.reconnect(60, 1000 * 10)) {
159157 this.publisher.publish("INQUIRY." + tblProductType.getName(), inquiry, State.CREATE);
160
- }else{
161
- this.logger.info(this.gson.toJson(new LoggerMessage<>("error","connection down")));
158
+ } else {
159
+ this.logger.info(this.gson.toJson(new LoggerMessage<>("error", "connection down")));
162160 }
163161 }
164
- System.out.println("INQUIRY." + tblProductType.getName());
162
+ Response response;
165163 Subscriber subscriber = new Subscriber(this.address);
166164 subscriber.connect(inquiry.getTransactionCode());
167
- Response response = subscriber.subscribe(Response.class);
165
+ response = subscriber.subscribe(Response.class);
168166 subscriber.disconnect();
167
+ subscriber.close();
168
+ this.logger.info(this.gson.toJson(new LoggerMessage<Response>("response", response)));
169169 return new ResponseEntity<String>(this.gson.toJson(response), HttpStatus.OK);
170170 }
171171
....@@ -187,16 +187,16 @@
187187 new Timestamp(System.currentTimeMillis())
188188 ));
189189 this.queueInRepository.saveAndFlush(new TblQueueIn(requestPayment.getTransactionCode(), this.productTypeRepository.findOne(requestPayment.getProduct()), requestPayment.getNominal(), requestPayment.getCustomerID(), new Timestamp(System.currentTimeMillis())));
190
- try{
190
+ try {
191191 this.publisher.publish("PAYMENT." + tblProductType.getCode().trim(), requestPayment, State.CREATE);
192
- }catch (ConnectionDown ex){
193
- if(this.publisher.reconnect(60,1000*10)){
192
+ } catch (ConnectionDown ex) {
193
+ if (this.publisher.reconnect(60, 1000 * 10)) {
194194 this.publisher.publish("PAYMENT." + tblProductType.getCode().trim(), requestPayment, State.CREATE);
195
- }else{
196
- this.logger.info(this.gson.toJson(new LoggerMessage<>("error","connection down")));
195
+ } else {
196
+ this.logger.info(this.gson.toJson(new LoggerMessage<>("error", "connection down")));
197197 }
198198 }
199
- this.logger.info(this.gson.toJson(new LoggerMessage<RequestPayment>("send PAYMENT." + tblProductType.getCode(),requestPayment)));
199
+ this.logger.info(this.gson.toJson(new LoggerMessage<RequestPayment>("send PAYMENT." + tblProductType.getCode(), requestPayment)));
200200 }
201201
202202 protected void initTransaction(RequestPayment requestPayment) throws Exception {
....@@ -214,42 +214,54 @@
214214 this.queueInRepository.saveAndFlush(new TblQueueIn(requestPayment.getTransactionCode(), this.productTypeRepository.findOne(requestPayment.getProduct()), requestPayment.getNominal(), requestPayment.getCustomerID(), new Timestamp(System.currentTimeMillis())));
215215 try {
216216 this.publisher.publish("PAYMENT." + tblProductType.getCode().trim(), requestPayment, State.CREATE);
217
- }catch (ConnectionDown ex){
218
- if(this.publisher.reconnect(60,1000*10)){
217
+ } catch (ConnectionDown ex) {
218
+ if (this.publisher.reconnect(60, 1000 * 10)) {
219219 this.publisher.publish("PAYMENT." + tblProductType.getCode().trim(), requestPayment, State.CREATE);
220
- }else{
221
- this.logger.info(this.gson.toJson(new LoggerMessage<>("error","connection down")));
220
+ } else {
221
+ this.logger.info(this.gson.toJson(new LoggerMessage<>("error", "connection down")));
222222 }
223223 }
224
- this.logger.info(this.gson.toJson(new LoggerMessage<RequestPayment>("send PAYMENT." + tblProductType.getCode().trim(),requestPayment)));
224
+ this.logger.info(this.gson.toJson(new LoggerMessage<RequestPayment>("send PAYMENT." + tblProductType.getCode().trim(), requestPayment)));
225225 }
226226
227227 @Subscribe(method = State.CREATE, target = Response.class)
228228 public void getResult(Response response) {
229
- this.logger.info(this.gson.toJson(new LoggerMessage<Response>("response",response)));
230
- TblTransaction tblTransaction = this.transactionRepository.findOne(response.getTransactionCode());
231
- if (this.queueInRepository.exists(tblTransaction.getId())) {
232
- this.queueInRepository.delete(tblTransaction.getId());
233
- }
234
- TblQueueOut tblQueueOut;
235
- if (response != null) {
236
- TblProduct tblProduct = this.productRepository.findOne(response.getProduct());
237
- tblTransaction.setStatus(response.getStatus());
238
- tblTransaction.setProduct(tblProduct);
239
- tblTransaction = this.transactionRepository.saveAndFlush(tblTransaction);
240
- if (tblTransaction.getStatus() == TblTransaction.Status.success) {
241
- tblQueueOut = this.queueOutRepository.saveAndFlush(new TblQueueOut(tblTransaction.getId(), tblTransaction.getProduct(), tblTransaction.getCustomerID(), tblTransaction.getTargetTime(), TblQueueOut.Status.success));
242
- } else {
243
- tblQueueOut = this.queueOutRepository.saveAndFlush(new TblQueueOut(tblTransaction.getId(), tblTransaction.getProduct(), tblTransaction.getCustomerID(), tblTransaction.getTargetTime(), TblQueueOut.Status.failed));
229
+ this.logger.info(this.gson.toJson(new LoggerMessage<Response>("response", response)));
230
+ try {
231
+ TblTransaction tblTransaction = this.transactionRepository.findOne(response.getTransactionCode());
232
+ if (this.queueInRepository.exists(tblTransaction.getId())) {
233
+ this.queueInRepository.delete(tblTransaction.getId());
244234 }
235
+ TblQueueOut tblQueueOut;
236
+ if (response != null) {
237
+ try {
238
+ TblProduct tblProduct = this.productRepository.findOne(response.getProduct());
239
+ tblTransaction.setStatus(response.getStatus());
240
+ tblTransaction.setProduct(tblProduct);
241
+ tblTransaction = this.transactionRepository.saveAndFlush(tblTransaction);
242
+ if (tblTransaction.getStatus() == TblTransaction.Status.success) {
243
+ tblQueueOut = this.queueOutRepository.saveAndFlush(new TblQueueOut(tblTransaction.getId(), tblTransaction.getProduct(), tblTransaction.getCustomerID(), tblTransaction.getTargetTime(), TblQueueOut.Status.success));
244
+ } else if (tblTransaction.getStatus() == TblTransaction.Status.failed) {
245
+ tblQueueOut = this.queueOutRepository.saveAndFlush(new TblQueueOut(tblTransaction.getId(), tblTransaction.getProduct(), tblTransaction.getCustomerID(), tblTransaction.getTargetTime(), TblQueueOut.Status.failed));
246
+ } else {
247
+ tblQueueOut = this.queueOutRepository.saveAndFlush(new TblQueueOut(tblTransaction.getId(), tblTransaction.getProduct(), tblTransaction.getCustomerID(), tblTransaction.getTargetTime(), TblQueueOut.Status.error));
248
+ }
245249
246
- HttpHeaders headers = new HttpHeaders();
247
- headers.setContentType(MediaType.APPLICATION_JSON);
248
- ResponseEntity<String> stringResponseEntity = this.restTemplate.postForEntity(this.myKadoAddress+tblTransaction.getProduct().getCallback(), new HttpEntity<>(new Gson().toJson(response), headers), String.class);
249
- if (stringResponseEntity.getStatusCode().equals(HttpStatus.OK)) {
250
- this.queueOutRepository.delete(tblQueueOut);
250
+ HttpHeaders headers = new HttpHeaders();
251
+ headers.setContentType(MediaType.APPLICATION_JSON);
252
+ this.logger.info("{\"callback_url\":\"" + this.myKadoAddress + tblTransaction.getProduct().getCallback() + "\"}");
253
+ ResponseEntity<String> stringResponseEntity = this.restTemplate.postForEntity(this.myKadoAddress + tblTransaction.getProduct().getCallback(), new HttpEntity<>(new Gson().toJson(response), headers), String.class);
254
+ if (stringResponseEntity.getStatusCode().equals(HttpStatus.OK)) {
255
+ this.queueOutRepository.delete(tblQueueOut);
256
+ }
257
+// this.logger.info(this.gson.toJson(stringResponseEntity));
258
+ this.logger.info(this.gson.toJson(new LoggerMessage<ResponseEntity>("post_callback", stringResponseEntity)));
259
+ } catch (Exception ex) {
260
+ this.logger.error(ex.getMessage(), ex);
261
+ }
251262 }
263
+ } catch (Exception ex) {
264
+ this.logger.error(ex.getMessage(), ex);
252265 }
253
-
254266 }
255267 }
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/resources/application-prod.properties
similarity index 68%copy from payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/resources/application-prod.propertiescopy to payment_gateway_api_service/src/main/resources/application-dev.properties
....@@ -1,14 +1,6 @@
1
-server.port=8181
2
-app.trigger.server.address=tcp://localhost:9696
3
-
4
-service.gateway.triversa.address=http://103.81.246.55:10003/api/v1/
5
-service.gateway.triversa.username=AMI
6
7
-service.gateway.triversa.product=2
8
-
9
-
1
+server.port=8080
102 spring.jmx.enabled=false
11
-spring.datasource.url=jdbc:mysql://172.31.4.96:3307/db_payment_gateway
3
+spring.datasource.url=jdbc:mysql://52.74.234.11:3307/db_payment_gateway
124 spring.datasource.username=mcoupon
135 spring.datasource.password=mcoupon
146 spring.datasource.tomcat.max-wait=20000
....@@ -20,5 +12,12 @@
2012 spring.jpa.properties.hibernate.id.new_generator_mappings = false
2113 spring.jpa.properties.hibernate.format_sql = true
2214
15
+
2316 spring.http.multipart.max-file-size=128MB
2417 spring.http.multipart.max-request-size=128MB
18
+
19
+mykado.address=http://localhost:8080/digital/callback/
20
+
21
+
22
+app.trigger.server.address=tcp://localhost:9696
23
+
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/resources/application-prod.properties
similarity index 73%rename from payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/resources/application-prod.propertiesrename to payment_gateway_api_service/src/main/resources/application-prod.properties
....@@ -1,12 +1,4 @@
1
-server.port=8181
2
-app.trigger.server.address=tcp://localhost:9696
3
-
4
-service.gateway.triversa.address=http://103.81.246.55:10003/api/v1/
5
-service.gateway.triversa.username=AMI
6
7
-service.gateway.triversa.product=2
8
-
9
-
1
+server.port=8080
102 spring.jmx.enabled=false
113 spring.datasource.url=jdbc:mysql://172.31.4.96:3307/db_payment_gateway
124 spring.datasource.username=mcoupon
....@@ -20,5 +12,18 @@
2012 spring.jpa.properties.hibernate.id.new_generator_mappings = false
2113 spring.jpa.properties.hibernate.format_sql = true
2214
15
+
2316 spring.http.multipart.max-file-size=128MB
2417 spring.http.multipart.max-request-size=128MB
18
+
19
+mykado.address=http://localhost:9010/digital-product/callback/
20
+
21
+services.pln=1
22
+
23
+service.gateway.axespay.address=http://202.152.60.90:9090
24
+service.gateway.axespay.username=GAM
25
+service.gateway.axespay.pin=22676
26
+
27
+
28
+app.trigger.server.address=tcp://localhost:9696
29
+
payment_gateway_api_service/src/main/resources/application.properties
....@@ -1,40 +1 @@
1
-server.port=8080
2
-spring.jmx.enabled=false
3
-#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
4
-#spring.datasource.url=jdbc:mysql://localhost:3306/db_payment_gateway
5
-#spring.datasource.username=root
6
-#spring.datasource.password=root
7
-spring.datasource.url=jdbc:mysql://172.31.4.96:3307/db_payment_gateway
8
-spring.datasource.username=mcoupon
9
-spring.datasource.password=mcoupon
10
-spring.datasource.tomcat.max-wait=20000
11
-spring.datasource.tomcat.max-active=50
12
-spring.datasource.tomcat.max-idle=20
13
-spring.datasource.tomcat.min-idle=15
14
-
15
-spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
16
-spring.jpa.properties.hibernate.id.new_generator_mappings = false
17
-spring.jpa.properties.hibernate.format_sql = true
18
-
19
-#logging.level.org.hibernate.SQL=DEBUG
20
-#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
21
-
22
-spring.http.multipart.max-file-size=128MB
23
-spring.http.multipart.max-request-size=128MB
24
-
25
-mykado.address=http://localhost:9010/digital-product/callback/
26
-#mykado.address=http://localhost:8080/digital/callback/
27
-
28
-services.pln=1
29
-
30
-#service.gateway.axespay.address=http://localhost:690
31
-service.gateway.axespay.address=http://202.152.60.90:9090
32
-service.gateway.axespay.username=GAM
33
-service.gateway.axespay.pin=22676
34
-
35
-
36
-app.trigger.server.address=tcp://localhost:9696
37
-
38
-#logging.file=C:\\AMCloud\\Project\\ECOMMERS\\payment_gateway\\log\\api\\
39
-logging.file=/home/ami/mykado/payment/log/api/
40
-logging.pattern={"level":"%level","time":"%date","location":"%logger","method":"%M","message":"%msg"}%n
1
+spring.profiles.active=prod
payment_gateway_api_service/src/main/resources/logback-spring.xml
....@@ -0,0 +1,65 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<configuration>
3
+
4
+ <property name="LOG_PATTERN"
5
+ value='{"level":"%level","time":"%date","location":"%logger","method":"%M","message":%msg},%n'/>
6
+ <springProfile name="dev">
7
+ <property name="LOG_PATH" value="~/drive/amcloud/Project/ECOMMERS/payment_gateway/log/"/>
8
+ </springProfile>
9
+ <springProfile name="prod">
10
+ <property name="LOG_PATH" value="/home/ami/mykado/payment/log"/>
11
+ </springProfile>
12
+ <!-- Send debug messages to System.out -->
13
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
14
+ <!-- By default, encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
15
+ <encoder>
16
+ <pattern>${LOG_PATTERN}</pattern>
17
+ </encoder>
18
+ </appender>
19
+
20
+ <!-- Send debug message to file -->
21
+ <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
22
+ <file>${LOG_PATH}/api.log</file>
23
+
24
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
25
+ <pattern>${LOG_PATTERN}</pattern>
26
+ </encoder>
27
+
28
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
29
+ <fileNamePattern>${LOG_PATH}/api/api-%i-%d{yyyyMMdd}.log</fileNamePattern>
30
+
31
+ <!-- each file should be at most 10MB, keep 90 days worth of history -->
32
+ <maxHistory>90</maxHistory>
33
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
34
+ <maxFileSize>10MB</maxFileSize>
35
+ </timeBasedFileNamingAndTriggeringPolicy>
36
+ </rollingPolicy>
37
+ </appender>
38
+
39
+ <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
40
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
41
+ <level>ERROR</level>
42
+ </filter>
43
+ <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
44
+ <driverClass>com.mysql.jdbc.Driver</driverClass>
45
+ <springProfile name="dev">
46
+ <url>jdbc:mysql://52.74.234.11:3307/db_payment_gateway</url>
47
+ </springProfile>
48
+ <springProfile name="prod">
49
+ <url>jdbc:mysql://172.31.4.96:3307/db_payment_gateway</url>
50
+ </springProfile>
51
+ <user>mcoupon</user>
52
+ <password>mcoupon</password>
53
+ </connectionSource>
54
+ </appender>
55
+
56
+ <root level="INFO">
57
+ <springProfile name="dev">
58
+ <appender-ref ref="STDOUT"/>
59
+ </springProfile>
60
+ <springProfile name="prod">
61
+ <appender-ref ref="FILE"/>
62
+ <appender-ref ref="DB"/>
63
+ </springProfile>
64
+ </root>
65
+</configuration>
payment_gateway_database_service/payment-gateway-database-service.iml
deleted file mode 100644
....@@ -1,61 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
4
- <output url="file://$MODULE_DIR$/target/classes" />
5
- <output-test url="file://$MODULE_DIR$/target/test-classes" />
6
- <content url="file://$MODULE_DIR$">
7
- <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
- <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9
- <excludeFolder url="file://$MODULE_DIR$/target" />
10
- </content>
11
- <orderEntry type="inheritedJdk" />
12
- <orderEntry type="sourceFolder" forTests="false" />
13
- <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
14
- <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.0" level="project" />
15
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:1.5.2.RELEASE" level="project" />
16
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.2.RELEASE" level="project" />
17
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
18
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.2.RELEASE" level="project" />
19
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.2.RELEASE" level="project" />
20
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
21
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
22
- <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.24" level="project" />
23
- <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.24" level="project" />
24
- <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
25
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
26
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:1.5.2.RELEASE" level="project" />
27
- <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
28
- <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
29
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.2.RELEASE" level="project" />
30
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.11" level="project" />
31
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.11" level="project" />
32
- <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.7.RELEASE" level="project" />
33
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.0.12.Final" level="project" />
34
- <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
35
- <orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final" level="project" />
36
- <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
37
- <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
38
- <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.0.Final" level="project" />
39
- <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
40
- <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.1.Final" level="project" />
41
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-entitymanager:5.0.12.Final" level="project" />
42
- <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.2" level="project" />
43
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:1.11.1.RELEASE" level="project" />
44
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.1.RELEASE" level="project" />
45
- <orderEntry type="library" name="Maven: org.springframework:spring-orm:4.3.7.RELEASE" level="project" />
46
- <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.7.RELEASE" level="project" />
47
- <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
48
- <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.7.RELEASE" level="project" />
49
- <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.7.RELEASE" level="project" />
50
- <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.24" level="project" />
51
- <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.24" level="project" />
52
- <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.7.RELEASE" level="project" />
53
- <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.41" level="project" />
54
- <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
55
- <orderEntry type="library" name="Maven: id.co.qhodok.tools:trigger:2.0" level="project" />
56
- <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
57
- <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
58
- <orderEntry type="library" name="Maven: org.zeromq:jeromq:0.4.2" level="project" />
59
- <orderEntry type="library" name="Maven: org.zeromq:jnacl:0.1.0" level="project" />
60
- </component>
61
-</module>
payment_gateway_database_service/pom.xml
....@@ -12,5 +12,18 @@
1212 <artifactId>payment-gateway-database-service</artifactId>
1313 <packaging>jar</packaging>
1414
15
+ <dependencies>
16
+
17
+ <!-- database -->
18
+ <dependency>
19
+ <groupId>org.springframework.boot</groupId>
20
+ <artifactId>spring-boot-starter-data-jpa</artifactId>
21
+ </dependency>
22
+ <dependency>
23
+ <groupId>mysql</groupId>
24
+ <artifactId>mysql-connector-java</artifactId>
25
+ </dependency>
26
+ </dependencies>
27
+
1528
1629 </project>
payment_gateway_database_service/src/main/java/id/co/accessmobile/payment/gateway/database/entity/TblQueueOut.java
....@@ -83,6 +83,6 @@
8383 }
8484
8585 public enum Status {
86
- success, failed
86
+ success, failed,error
8787 }
8888 }
payment_gateway_database_service/src/main/java/id/co/accessmobile/payment/gateway/database/entity/TblTransaction.java
....@@ -122,7 +122,7 @@
122122 }
123123
124124 public enum Status {
125
- initiate, processing, success, failed
125
+ initiate, processing, success, failed, error
126126 }
127127
128128
payment_gateway_database_service/src/main/java/id/co/accessmobile/payment/gateway/database/repository/ProductRepository.java
....@@ -17,4 +17,6 @@
1717 public interface ProductRepository extends JpaRepository<TblProduct, Integer> {
1818 @Query(value = "FROM TblProduct as product where product.productType.id=? and product.nominal=? and merchant.id=?")
1919 public TblProduct findByTypeAndNominal(int type, String nominal,int merchantID);
20
+ @Query(value = "FROM TblProduct as product where product.productType.id=? and product.nominal=? and merchant.id=? and product.callback=?")
21
+ public TblProduct findByTypeAndNominalAndCallback(int type, String nominal,int merchantID, String callback);
2022 }
payment_gateway_merchant_list/payment-gateway-merchant-list.iml
deleted file mode 100644
....@@ -1,60 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
4
- <output url="file://$MODULE_DIR$/target/classes" />
5
- <output-test url="file://$MODULE_DIR$/target/test-classes" />
6
- <content url="file://$MODULE_DIR$">
7
- <excludeFolder url="file://$MODULE_DIR$/target" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- <orderEntry type="module" module-name="payment-gateway-tools" />
12
- <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
13
- <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.0" level="project" />
14
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:1.5.2.RELEASE" level="project" />
15
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.2.RELEASE" level="project" />
16
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
17
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.2.RELEASE" level="project" />
18
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.2.RELEASE" level="project" />
19
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
20
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
21
- <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.24" level="project" />
22
- <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.24" level="project" />
23
- <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
24
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
25
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:1.5.2.RELEASE" level="project" />
26
- <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
27
- <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
28
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.2.RELEASE" level="project" />
29
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.11" level="project" />
30
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.11" level="project" />
31
- <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.7.RELEASE" level="project" />
32
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.0.12.Final" level="project" />
33
- <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
34
- <orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final" level="project" />
35
- <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
36
- <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
37
- <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.0.Final" level="project" />
38
- <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
39
- <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.1.Final" level="project" />
40
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-entitymanager:5.0.12.Final" level="project" />
41
- <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.2" level="project" />
42
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:1.11.1.RELEASE" level="project" />
43
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.1.RELEASE" level="project" />
44
- <orderEntry type="library" name="Maven: org.springframework:spring-orm:4.3.7.RELEASE" level="project" />
45
- <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.7.RELEASE" level="project" />
46
- <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
47
- <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.7.RELEASE" level="project" />
48
- <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.7.RELEASE" level="project" />
49
- <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.24" level="project" />
50
- <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.24" level="project" />
51
- <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.7.RELEASE" level="project" />
52
- <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.41" level="project" />
53
- <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
54
- <orderEntry type="library" name="Maven: id.co.qhodok.tools:trigger:2.0" level="project" />
55
- <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
56
- <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
57
- <orderEntry type="library" name="Maven: org.zeromq:jeromq:0.4.2" level="project" />
58
- <orderEntry type="library" name="Maven: org.zeromq:jnacl:0.1.0" level="project" />
59
- </component>
60
-</module>
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln.iml
deleted file mode 100644
....@@ -1,60 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
4
- <output url="file://$MODULE_DIR$/target/classes" />
5
- <output-test url="file://$MODULE_DIR$/target/test-classes" />
6
- <content url="file://$MODULE_DIR$">
7
- <excludeFolder url="file://$MODULE_DIR$/target" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- <orderEntry type="module" module-name="payment-gateway-tools" />
12
- <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
13
- <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.0" level="project" />
14
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:1.5.2.RELEASE" level="project" />
15
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.2.RELEASE" level="project" />
16
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
17
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.2.RELEASE" level="project" />
18
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.2.RELEASE" level="project" />
19
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
20
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
21
- <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.24" level="project" />
22
- <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.24" level="project" />
23
- <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
24
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
25
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:1.5.2.RELEASE" level="project" />
26
- <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
27
- <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
28
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.2.RELEASE" level="project" />
29
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.11" level="project" />
30
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.11" level="project" />
31
- <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.7.RELEASE" level="project" />
32
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.0.12.Final" level="project" />
33
- <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
34
- <orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final" level="project" />
35
- <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
36
- <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
37
- <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.0.Final" level="project" />
38
- <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
39
- <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.1.Final" level="project" />
40
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-entitymanager:5.0.12.Final" level="project" />
41
- <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.2" level="project" />
42
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:1.11.1.RELEASE" level="project" />
43
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.1.RELEASE" level="project" />
44
- <orderEntry type="library" name="Maven: org.springframework:spring-orm:4.3.7.RELEASE" level="project" />
45
- <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.7.RELEASE" level="project" />
46
- <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
47
- <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.7.RELEASE" level="project" />
48
- <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.7.RELEASE" level="project" />
49
- <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.24" level="project" />
50
- <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.24" level="project" />
51
- <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.7.RELEASE" level="project" />
52
- <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.41" level="project" />
53
- <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
54
- <orderEntry type="library" name="Maven: id.co.qhodok.tools:trigger:2.0" level="project" />
55
- <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
56
- <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
57
- <orderEntry type="library" name="Maven: org.zeromq:jeromq:0.4.2" level="project" />
58
- <orderEntry type="library" name="Maven: org.zeromq:jnacl:0.1.0" level="project" />
59
- </component>
60
-</module>
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln_axes_pay/payment-gateway-merchant-pln-axes-pay.iml
deleted file mode 100644
....@@ -1,65 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
4
- <output url="file://$MODULE_DIR$/target/classes" />
5
- <output-test url="file://$MODULE_DIR$/target/test-classes" />
6
- <content url="file://$MODULE_DIR$">
7
- <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
- <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9
- <excludeFolder url="file://$MODULE_DIR$/target" />
10
- </content>
11
- <orderEntry type="inheritedJdk" />
12
- <orderEntry type="sourceFolder" forTests="false" />
13
- <orderEntry type="module" module-name="payment-gateway-model" />
14
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.2.RELEASE" level="project" />
15
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
16
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.2.RELEASE" level="project" />
17
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.2.RELEASE" level="project" />
18
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
19
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
20
- <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.24" level="project" />
21
- <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.24" level="project" />
22
- <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.24" level="project" />
23
- <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
24
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
25
- <orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.7.RELEASE" level="project" />
26
- <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
27
- <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.7.RELEASE" level="project" />
28
- <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.7.RELEASE" level="project" />
29
- <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
30
- <orderEntry type="module" module-name="payment-gateway-database-service" />
31
- <orderEntry type="module" module-name="payment-gateway-tools" />
32
- <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
33
- <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.0" level="project" />
34
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:1.5.2.RELEASE" level="project" />
35
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:1.5.2.RELEASE" level="project" />
36
- <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
37
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.2.RELEASE" level="project" />
38
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.11" level="project" />
39
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.11" level="project" />
40
- <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.7.RELEASE" level="project" />
41
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.0.12.Final" level="project" />
42
- <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
43
- <orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final" level="project" />
44
- <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
45
- <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
46
- <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.0.Final" level="project" />
47
- <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
48
- <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.1.Final" level="project" />
49
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-entitymanager:5.0.12.Final" level="project" />
50
- <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.2" level="project" />
51
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:1.11.1.RELEASE" level="project" />
52
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.1.RELEASE" level="project" />
53
- <orderEntry type="library" name="Maven: org.springframework:spring-orm:4.3.7.RELEASE" level="project" />
54
- <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.7.RELEASE" level="project" />
55
- <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.24" level="project" />
56
- <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.7.RELEASE" level="project" />
57
- <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.41" level="project" />
58
- <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
59
- <orderEntry type="library" name="Maven: id.co.qhodok.tools:trigger:2.0" level="project" />
60
- <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
61
- <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
62
- <orderEntry type="library" name="Maven: org.zeromq:jeromq:0.4.2" level="project" />
63
- <orderEntry type="library" name="Maven: org.zeromq:jnacl:0.1.0" level="project" />
64
- </component>
65
-</module>
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln_axes_pay/src/main/java/id/co/accessmobile/payment/gateway/merchant/pln/axes_pay/service/PLNPOSTpaid.java
....@@ -1,6 +1,5 @@
11 package id.co.accessmobile.payment.gateway.merchant.pln.axes_pay.service;
22
3
-import ch.qos.logback.classic.Logger;
43 import com.google.gson.Gson;
54 import id.co.accessmobile.adzanreminder.hutch.tools.LoggerMessage;
65 import id.co.accessmobile.adzanreminder.hutch.tools.Tools;
....@@ -21,6 +20,8 @@
2120 import org.json.JSONException;
2221 import org.json.JSONObject;
2322 import org.json.XML;
23
+import org.slf4j.Logger;
24
+import org.slf4j.LoggerFactory;
2425 import org.springframework.beans.factory.annotation.Autowired;
2526 import org.springframework.beans.factory.annotation.Value;
2627 import org.springframework.http.HttpEntity;
....@@ -56,12 +57,6 @@
5657 protected String pin;
5758 @Autowired
5859 protected ProductRepository productRepository;
59
-
60
- @Value("${logging.file}")
61
- protected String loggingFile;
62
-
63
- @Value("${logging.pattern}")
64
- protected String loggingPattern;
6560
6661 protected RestTemplate restTemplate;
6762
....@@ -117,7 +112,7 @@
117112 this.publisher = new Publisher(this.triggerAddress);
118113 this.subscriber = new Subscriber(this.triggerAddress);
119114 this.subscriber.connect("INQUIRY.PLN.POSTPAID");
120
- this.logger = Tools.createLogger(PLNPrepaid.class, this.loggingFile + "prepaid" + File.separator, this.loggingPattern);
115
+ this.logger = LoggerFactory.getLogger(PLNPOSTpaid.class);
121116 this.gson = new Gson();
122117 }
123118
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln_axes_pay/src/main/java/id/co/accessmobile/payment/gateway/merchant/pln/axes_pay/service/PLNPrepaid.java
....@@ -1,6 +1,5 @@
11 package id.co.accessmobile.payment.gateway.merchant.pln.axes_pay.service;
22
3
-import ch.qos.logback.classic.Logger;
43 import com.google.gson.Gson;
54 import id.co.accessmobile.adzanreminder.hutch.tools.LoggerMessage;
65 import id.co.accessmobile.adzanreminder.hutch.tools.Tools;
....@@ -21,6 +20,8 @@
2120 import org.json.JSONException;
2221 import org.json.JSONObject;
2322 import org.json.XML;
23
+import org.slf4j.Logger;
24
+import org.slf4j.LoggerFactory;
2425 import org.springframework.beans.factory.annotation.Autowired;
2526 import org.springframework.beans.factory.annotation.Value;
2627 import org.springframework.http.HttpEntity;
....@@ -54,12 +55,6 @@
5455
5556 @Value("${service.gateway.axespay.pin}")
5657 protected String pin;
57
-
58
- @Value("${logging.file}")
59
- protected String loggingFile;
60
-
61
- @Value("${logging.pattern}")
62
- protected String loggingPattern;
6358
6459 @Autowired
6560 protected ProductRepository productRepository;
....@@ -118,9 +113,8 @@
118113 this.publisher = new Publisher(this.triggerAddress);
119114 this.subscriber = new Subscriber(this.triggerAddress);
120115 this.subscriber.connect("INQUIRY.PLN.PREPAID");
121
- this.logger = Tools.createLogger(PLNPrepaid.class, this.loggingFile + "prepaid" + File.separator, this.loggingPattern);
116
+ this.logger = LoggerFactory.getLogger(PLNPrepaid.class);
122117 this.gson = new Gson();
123
- System.out.println("init");
124118 }
125119
126120 @Scheduled(fixedDelay = 100)
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln_axes_pay/src/main/resources/application-dev.properties
....@@ -0,0 +1,27 @@
1
+app.trigger.server.address=tcp://localhost:9696
2
+
3
+service.gateway.axespay.address=http://localhost:690
4
+service.gateway.axespay.username=GAM
5
+service.gateway.axespay.pin=22676
6
+service.gateway.axespay.product=1
7
+
8
+spring.jmx.enabled=false
9
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
10
+spring.datasource.url=jdbc:mysql://localhost:3306/db_payment_gateway
11
+spring.datasource.username=root
12
+spring.datasource.password=root
13
+spring.datasource.tomcat.max-wait=20000
14
+spring.datasource.tomcat.max-active=50
15
+spring.datasource.tomcat.max-idle=20
16
+spring.datasource.tomcat.min-idle=15
17
+
18
+spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
19
+spring.jpa.properties.hibernate.id.new_generator_mappings = false
20
+spring.jpa.properties.hibernate.format_sql = true
21
+
22
+#logging.level.org.hibernate.SQL=DEBUG
23
+#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
24
+
25
+spring.http.multipart.max-file-size=128MB
26
+spring.http.multipart.max-request-size=128MB
27
+
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln_axes_pay/src/main/resources/application-prod.properties
....@@ -0,0 +1,25 @@
1
+app.trigger.server.address=tcp://localhost:9696
2
+
3
+
4
+service.gateway.axespay.address=http://202.152.60.90:9090
5
+service.gateway.axespay.username=GAM
6
+service.gateway.axespay.pin=22676
7
+service.gateway.axespay.product=1
8
+
9
+spring.jmx.enabled=false
10
+spring.datasource.url=jdbc:mysql://172.31.4.96:3307/db_payment_gateway
11
+spring.datasource.username=mcoupon
12
+spring.datasource.password=mcoupon
13
+spring.datasource.tomcat.max-wait=20000
14
+spring.datasource.tomcat.max-active=50
15
+spring.datasource.tomcat.max-idle=20
16
+spring.datasource.tomcat.min-idle=15
17
+
18
+spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
19
+spring.jpa.properties.hibernate.id.new_generator_mappings = false
20
+spring.jpa.properties.hibernate.format_sql = true
21
+
22
+
23
+spring.http.multipart.max-file-size=128MB
24
+spring.http.multipart.max-request-size=128MB
25
+
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln_axes_pay/src/main/resources/application.properties
....@@ -1,36 +1 @@
1
-app.trigger.server.address=tcp://localhost:9696
2
-
3
-
4
-service.gateway.axespay.address=http://202.152.60.90:9090
5
-#service.gateway.axespay.address=http://localhost:690
6
-service.gateway.axespay.username=GAM
7
-service.gateway.axespay.pin=22676
8
-service.gateway.axespay.product=1
9
-
10
-spring.jmx.enabled=false
11
-#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
12
-#spring.datasource.url=jdbc:mysql://localhost:3306/db_payment_gateway
13
-#spring.datasource.username=root
14
-#spring.datasource.password=root
15
-spring.datasource.url=jdbc:mysql://172.31.4.96:3307/db_payment_gateway
16
-spring.datasource.username=mcoupon
17
-spring.datasource.password=mcoupon
18
-spring.datasource.tomcat.max-wait=20000
19
-spring.datasource.tomcat.max-active=50
20
-spring.datasource.tomcat.max-idle=20
21
-spring.datasource.tomcat.min-idle=15
22
-
23
-spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
24
-spring.jpa.properties.hibernate.id.new_generator_mappings = false
25
-spring.jpa.properties.hibernate.format_sql = true
26
-
27
-#logging.level.org.hibernate.SQL=DEBUG
28
-#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
29
-
30
-spring.http.multipart.max-file-size=128MB
31
-spring.http.multipart.max-request-size=128MB
32
-
33
-
34
-#logging.file=C:\\AMCloud\\Project\\ECOMMERS\\payment_gateway\\log\\axespay\\
35
-logging.file=/home/ami/mykado/payment/log/axespay/
36
-logging.pattern={"level":"%level","time":"%date","location":"%logger","method":"%M","message":"%msg"}%n
1
+spring.profiles.active=prod
payment_gateway_merchant_list/payment_gateway_merchant_pln/payment_gateway_merchant_pln_axes_pay/src/main/resources/logback-spring.xml
....@@ -0,0 +1,65 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<configuration>
3
+
4
+ <property name="LOG_PATTERN"
5
+ value='{"level":"%level","time":"%date","location":"%logger","method":"%M","message":%msg},%n'/>
6
+ <springProfile name="dev">
7
+ <property name="LOG_PATH" value="~/drive/amcloud/Project/ECOMMERS/payment_gateway/log/"/>
8
+ </springProfile>
9
+ <springProfile name="prod">
10
+ <property name="LOG_PATH" value="/home/ami/mykado/payment/log"/>
11
+ </springProfile>
12
+ <!-- Send debug messages to System.out -->
13
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
14
+ <!-- By default, encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
15
+ <encoder>
16
+ <pattern>${LOG_PATTERN}</pattern>
17
+ </encoder>
18
+ </appender>
19
+
20
+ <!-- Send debug message to file -->
21
+ <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
22
+ <file>${LOG_PATH}/axespay.log</file>
23
+
24
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
25
+ <pattern>${LOG_PATTERN}</pattern>
26
+ </encoder>
27
+
28
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
29
+ <fileNamePattern>${LOG_PATH}/axespay/axespay-%i-%d{yyyyMMdd}.log</fileNamePattern>
30
+
31
+ <!-- each file should be at most 10MB, keep 90 days worth of history -->
32
+ <maxHistory>90</maxHistory>
33
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
34
+ <maxFileSize>10MB</maxFileSize>
35
+ </timeBasedFileNamingAndTriggeringPolicy>
36
+ </rollingPolicy>
37
+ </appender>
38
+
39
+ <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
40
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
41
+ <level>ERROR</level>
42
+ </filter>
43
+ <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
44
+ <driverClass>com.mysql.jdbc.Driver</driverClass>
45
+ <springProfile name="dev">
46
+ <url>jdbc:mysql://52.74.234.11:3307/db_payment_gateway</url>
47
+ </springProfile>
48
+ <springProfile name="prod">
49
+ <url>jdbc:mysql://172.31.4.96:3307/db_payment_gateway</url>
50
+ </springProfile>
51
+ <user>mcoupon</user>
52
+ <password>mcoupon</password>
53
+ </connectionSource>
54
+ </appender>
55
+
56
+ <root level="INFO">
57
+ <springProfile name="dev">
58
+ <appender-ref ref="STDOUT"/>
59
+ </springProfile>
60
+ <springProfile name="prod">
61
+ <appender-ref ref="FILE"/>
62
+ <appender-ref ref="DB"/>
63
+ </springProfile>
64
+ </root>
65
+</configuration>
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment-gateway-merchant-pulsa.iml
deleted file mode 100644
....@@ -1,60 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
4
- <output url="file://$MODULE_DIR$/target/classes" />
5
- <output-test url="file://$MODULE_DIR$/target/test-classes" />
6
- <content url="file://$MODULE_DIR$">
7
- <excludeFolder url="file://$MODULE_DIR$/target" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- <orderEntry type="module" module-name="payment-gateway-tools" />
12
- <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
13
- <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.0" level="project" />
14
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:1.5.2.RELEASE" level="project" />
15
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.2.RELEASE" level="project" />
16
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
17
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.2.RELEASE" level="project" />
18
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.2.RELEASE" level="project" />
19
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
20
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
21
- <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.24" level="project" />
22
- <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.24" level="project" />
23
- <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
24
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
25
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:1.5.2.RELEASE" level="project" />
26
- <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
27
- <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
28
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.2.RELEASE" level="project" />
29
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.11" level="project" />
30
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.11" level="project" />
31
- <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.7.RELEASE" level="project" />
32
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.0.12.Final" level="project" />
33
- <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
34
- <orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final" level="project" />
35
- <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
36
- <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
37
- <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.0.Final" level="project" />
38
- <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
39
- <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.1.Final" level="project" />
40
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-entitymanager:5.0.12.Final" level="project" />
41
- <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.2" level="project" />
42
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:1.11.1.RELEASE" level="project" />
43
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.1.RELEASE" level="project" />
44
- <orderEntry type="library" name="Maven: org.springframework:spring-orm:4.3.7.RELEASE" level="project" />
45
- <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.7.RELEASE" level="project" />
46
- <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
47
- <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.7.RELEASE" level="project" />
48
- <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.7.RELEASE" level="project" />
49
- <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.24" level="project" />
50
- <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.24" level="project" />
51
- <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.7.RELEASE" level="project" />
52
- <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.41" level="project" />
53
- <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
54
- <orderEntry type="library" name="Maven: id.co.qhodok.tools:trigger:2.0" level="project" />
55
- <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
56
- <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
57
- <orderEntry type="library" name="Maven: org.zeromq:jeromq:0.4.2" level="project" />
58
- <orderEntry type="library" name="Maven: org.zeromq:jnacl:0.1.0" level="project" />
59
- </component>
60
-</module>
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/pom.xml
....@@ -0,0 +1,45 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
+ <parent>
6
+ <artifactId>payment-gateway-merchant-pulsa</artifactId>
7
+ <groupId>id.co.accessmobile.payment.gateway</groupId>
8
+ <version>1.0</version>
9
+ </parent>
10
+ <modelVersion>4.0.0</modelVersion>
11
+
12
+ <artifactId>payment-gateway-merchant-pulsa-sepulsa</artifactId>
13
+
14
+ <dependencies>
15
+ <dependency>
16
+ <groupId>id.co.accessmobile.payment.gateway</groupId>
17
+ <artifactId>payment-gateway-model</artifactId>
18
+ <version>1.0</version>
19
+ </dependency>
20
+ <dependency>
21
+ <groupId>org.springframework.boot</groupId>
22
+ <artifactId>spring-boot-starter-web</artifactId>
23
+ </dependency>
24
+ <dependency>
25
+ <groupId>id.co.accessmobile.payment.gateway</groupId>
26
+ <artifactId>payment-gateway-database-service</artifactId>
27
+ <version>1.0</version>
28
+ </dependency>
29
+ <dependency>
30
+ <groupId>org.projectlombok</groupId>
31
+ <artifactId>lombok</artifactId>
32
+ <version>1.16.8</version>
33
+ <scope>provided</scope>
34
+ </dependency>
35
+ </dependencies>
36
+
37
+ <build>
38
+ <plugins>
39
+ <plugin>
40
+ <groupId>org.springframework.boot</groupId>
41
+ <artifactId>spring-boot-maven-plugin</artifactId>
42
+ </plugin>
43
+ </plugins>
44
+ </build>
45
+</project>
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/Application.java
....@@ -0,0 +1,109 @@
1
+package id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa;
2
+
3
+import com.google.gson.Gson;
4
+import id.co.accessmobile.adzanreminder.hutch.tools.LoggerMessage;
5
+import id.co.accessmobile.payment.gateway.database.entity.TblProduct;
6
+import id.co.accessmobile.payment.gateway.database.entity.TblTransaction;
7
+import id.co.accessmobile.payment.gateway.database.repository.ProductRepository;
8
+import id.co.accessmobile.payment.gateway.database.repository.TransactionRepository;
9
+import id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.model.CallbackResponse;
10
+import id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.model.ResponseMobileTransaction;
11
+import id.co.accessmobile.payment.gateway.model.transaction.Response;
12
+import id.co.qhodok.tools.trigger.TriggerApplication;
13
+import id.co.qhodok.tools.trigger.attributes.State;
14
+import id.co.qhodok.tools.trigger.exceptions.ConnectionDown;
15
+import id.co.qhodok.tools.trigger.processor.Publisher;
16
+import org.slf4j.Logger;
17
+import org.slf4j.LoggerFactory;
18
+import org.springframework.beans.factory.annotation.Autowired;
19
+import org.springframework.beans.factory.annotation.Value;
20
+import org.springframework.boot.SpringApplication;
21
+import org.springframework.boot.autoconfigure.SpringBootApplication;
22
+import org.springframework.boot.autoconfigure.domain.EntityScan;
23
+import org.springframework.context.annotation.ComponentScan;
24
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
25
+import org.springframework.http.HttpStatus;
26
+import org.springframework.http.ResponseEntity;
27
+import org.springframework.scheduling.annotation.EnableAsync;
28
+import org.springframework.scheduling.annotation.EnableScheduling;
29
+import org.springframework.stereotype.Controller;
30
+import org.springframework.web.bind.annotation.RequestBody;
31
+import org.springframework.web.bind.annotation.RequestMapping;
32
+import org.springframework.web.bind.annotation.RequestMethod;
33
+
34
+import javax.annotation.PostConstruct;
35
+
36
37
[email protected](basePackages = {"id.co.accessmobile.payment.gateway"})
38
[email protected](basePackages = {"id.co.accessmobile.payment.gateway"})
39
[email protected](basePackages = {"id.co.accessmobile.payment.gateway"})
40
41
42
43
+public class Application {
44
+ @Value("${app.trigger.server.address}")
45
+ protected String address;
46
+
47
+ @Autowired
48
+ protected TransactionRepository transactionRepository;
49
+
50
+ @Autowired
51
+ protected ProductRepository productRepository;
52
+
53
+ protected Publisher publisher;
54
+ protected Logger logger;
55
+ protected Gson gson;
56
+
57
+ public static TriggerApplication triggerApplication;
58
+
59
+ public static void main(String[] args) {
60
+ SpringApplication.run(Application.class, args);
61
+ }
62
+
63
+ @PostConstruct
64
+ public void init() {
65
+ triggerApplication = new TriggerApplication(6, this.address);
66
+ this.gson = new Gson();
67
+ this.publisher = new Publisher(this.address);
68
+ this.logger = LoggerFactory.getLogger(Application.class);
69
+ }
70
+
71
+ @RequestMapping(value = "/callback", method = RequestMethod.POST)
72
+ public ResponseEntity<String> callback(@RequestBody CallbackResponse callbackResponse) {
73
+ this.logger.info(this.gson.toJson(new LoggerMessage<CallbackResponse>("response", callbackResponse)));
74
+ ResponseEntity<String> responseEntity = null;
75
+ try {
76
+ TblTransaction tblTransaction = this.transactionRepository.findOne(callbackResponse.getOrder_id());
77
+ TblProduct tblProduct = tblTransaction.getProduct();
78
+ Response<CallbackResponse> response = new Response();
79
+ response.setTransactionCode(tblTransaction.getId());
80
+ response.setProduct(tblProduct.getId());
81
+ response.setMessage(callbackResponse);
82
+ if (callbackResponse.getStatus().trim().toLowerCase().matches("success")) {
83
+ response.setStatus(TblTransaction.Status.success);
84
+ } else if (callbackResponse.getStatus().trim().toLowerCase().matches("pending")) {
85
+ response.setStatus(TblTransaction.Status.processing);
86
+ } else {
87
+ response.setStatus(TblTransaction.Status.failed);
88
+ }
89
+ try {
90
+ this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
91
+ } catch (ConnectionDown ex) {
92
+ this.logger.error(ex.getMessage(), ex);
93
+ if (this.publisher.reconnect(60, 1000 * 10)) {
94
+ this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
95
+ } else {
96
+ this.logger.info(this.gson.toJson(new LoggerMessage<String>("error", "connection down")));
97
+ }
98
+ }
99
+ this.logger.info(this.gson.toJson(new LoggerMessage<Response>("result", response)));
100
+ responseEntity = new ResponseEntity<String>("SUCCESS", HttpStatus.OK);
101
+
102
+ } catch (Exception ex) {
103
+ this.logger.error(ex.getMessage(), ex);
104
+ responseEntity = new ResponseEntity<String>("FAILED", HttpStatus.OK);
105
+ } finally {
106
+ return responseEntity;
107
+ }
108
+ }
109
+}
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/model/CallbackResponse.java
....@@ -0,0 +1,23 @@
1
+package id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.model;
2
+
3
+import lombok.Data;
4
+import lombok.NoArgsConstructor;
5
+import lombok.ToString;
6
+
7
8
9
10
+public class CallbackResponse {
11
+ protected String serial_number;
12
+ protected String transaction_id;
13
+ protected String type;
14
+ protected String created;
15
+ protected String changed;
16
+ protected String customer_number;
17
+ protected String product_id;
18
+ protected String order_id;
19
+ protected String status;
20
+ protected String price;
21
+ protected String response_code;
22
+ protected String key;
23
+}
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/model/RequestMobile.java
....@@ -0,0 +1,14 @@
1
+package id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.model;
2
+
3
+import lombok.Data;
4
+import lombok.NoArgsConstructor;
5
+import lombok.ToString;
6
+
7
8
9
10
+public class RequestMobile {
11
+ protected String customer_number;
12
+ protected int product_id;
13
+ protected String order_id;
14
+}
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/model/ResponseMobileInquirePostpaid.java
....@@ -0,0 +1,20 @@
1
+package id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.model;
2
+
3
+import lombok.Data;
4
+import lombok.NoArgsConstructor;
5
+import lombok.ToString;
6
+
7
8
9
10
+public class ResponseMobileInquirePostpaid {
11
+ protected String reference_no;
12
+ protected String customer_no;
13
+ protected String customer_name;
14
+ protected String response_code;
15
+ protected String bill_count;
16
+ protected String bill_periode;
17
+ protected String bill_amount;
18
+ protected String admin_fee;
19
+ protected String total_amount;
20
+}
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/model/ResponseMobileTransaction.java
....@@ -0,0 +1,24 @@
1
+package id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.model;
2
+
3
+import lombok.Data;
4
+import lombok.NoArgsConstructor;
5
+import lombok.ToString;
6
+
7
8
9
10
+public class ResponseMobileTransaction {
11
+ protected String data;
12
+ protected String transaction_id;
13
+ protected String type;
14
+ protected String created;
15
+ protected String changed;
16
+ protected String customer_number;
17
+ protected ResponseProductID product_id;
18
+ protected String order_id;
19
+ protected String amount;
20
+ protected String status;
21
+ protected String price;
22
+ protected String response_code;
23
+ protected String serial_number;
24
+}
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/model/ResponseProductID.java
....@@ -0,0 +1,20 @@
1
+package id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.model;
2
+
3
+import lombok.Data;
4
+import lombok.NoArgsConstructor;
5
+import lombok.ToString;
6
+
7
8
9
10
+public class ResponseProductID {
11
+ protected boolean field_paket_data;
12
+ protected String field_denom;
13
+ protected String product_id;
14
+ protected String type;
15
+ protected String label;
16
+ protected String operator;
17
+ protected String nominal;
18
+ protected long price;
19
+ protected String enable;
20
+}
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/service/data/Data.java
....@@ -0,0 +1,141 @@
1
+package id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.service.data;
2
+
3
+import com.google.gson.Gson;
4
+import id.co.accessmobile.adzanreminder.hutch.tools.LoggerMessage;
5
+import id.co.accessmobile.payment.gateway.database.entity.TblProduct;
6
+import id.co.accessmobile.payment.gateway.database.entity.TblTransaction;
7
+import id.co.accessmobile.payment.gateway.database.repository.ProductRepository;
8
+import id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.Application;
9
+import id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.model.RequestMobile;
10
+import id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.model.ResponseMobileTransaction;
11
+import id.co.accessmobile.payment.gateway.model.transaction.RequestPayment;
12
+import id.co.accessmobile.payment.gateway.model.transaction.Response;
13
+import id.co.qhodok.tools.logger.Logger;
14
+import id.co.qhodok.tools.trigger.annotations.Listener;
15
+import id.co.qhodok.tools.trigger.annotations.Subscribe;
16
+import id.co.qhodok.tools.trigger.attributes.State;
17
+import id.co.qhodok.tools.trigger.exceptions.ConnectionDown;
18
+import id.co.qhodok.tools.trigger.processor.Publisher;
19
+import org.springframework.beans.factory.annotation.Autowired;
20
+import org.springframework.beans.factory.annotation.Value;
21
+import org.springframework.http.HttpEntity;
22
+import org.springframework.http.HttpHeaders;
23
+import org.springframework.http.MediaType;
24
+import org.springframework.http.ResponseEntity;
25
+import org.springframework.stereotype.Component;
26
+import org.springframework.web.client.HttpServerErrorException;
27
+import org.springframework.web.client.RestTemplate;
28
+
29
+import javax.annotation.PostConstruct;
30
+import java.util.ArrayList;
31
+
32
+/**
33
+ * Created by Permana on 22/12/2017.
34
+ * Software Enginer
35
+ * Access Mobile Indonesia
36
37
+ */
38
[email protected](topic = "PAYMENT.DATA")
39
40
+public class Data {
41
+ @Value("${app.trigger.server.address}")
42
+ protected String triggerAddress;
43
+
44
+ @Value("${service.gateway.sepulsa.address}")
45
+ protected String address;
46
+
47
+ @Value("${service.gateway.sepulsa.username}")
48
+ protected String username;
49
+
50
+ @Value("${service.gateway.sepulsa.password}")
51
+ protected String password;
52
+ @Value("${service.gateway.sepulsa.authorization}")
53
+ protected String authorization;
54
+ @Value("${service.gateway.sepulsa.product}")
55
+ protected String product;
56
+
57
+ @Autowired
58
+ protected ProductRepository productRepository;
59
+
60
+
61
+ protected Publisher publisher;
62
+ protected Gson gson;
63
+ protected RestTemplate restTemplate;
64
+ protected HttpHeaders headers;
65
+ protected Object paymentKey = new Object();
66
+ protected Logger logger;
67
+
68
+ @PostConstruct
69
+ public void init() {
70
+ Application.triggerApplication.addSubscriber(this);
71
+ this.publisher = new Publisher(this.triggerAddress);
72
+ this.gson = new Gson();
73
+ this.restTemplate = new RestTemplate();
74
+ this.headers = new HttpHeaders();
75
+ this.headers.setContentType(MediaType.APPLICATION_JSON);
76
+ ArrayList<MediaType> mediaTypes = new ArrayList<>();
77
+ mediaTypes.add(MediaType.APPLICATION_JSON);
78
+ this.headers.setAccept(mediaTypes);
79
+ this.headers.set("Authorization", "Basic " + this.authorization);
80
+ this.headers.set("User-Agent", this.username);
81
+ this.logger = new Logger(Data.class, "ami_mykado_bot", "499520749:AAHUJ5qPWCzFkTZmT0MKShhxYhWNYBIs5Rg", "-263373638");
82
+ this.address += "transaction/mobile.json";
83
+ }
84
+
85
+ @Subscribe(method = State.CREATE, target = RequestPayment.class)
86
+ public void payment(RequestPayment payment) {
87
+ this.logger.info("subscribe", payment);
88
+ try {
89
+ TblProduct tblProduct = this.productRepository.findByTypeAndNominal(payment.getProduct(), payment.getNominal(), Integer.valueOf(this.product));
90
+ int code = Integer.valueOf(tblProduct.getCode());
91
+ synchronized (this.paymentKey) {
92
+ RequestMobile request = new RequestMobile();
93
+ request.setCustomer_number(payment.getCustomerID());
94
+ request.setOrder_id(payment.getTransactionCode());
95
+ request.setProduct_id(code);
96
+
97
+ Response response = new Response();
98
+ response.setTransactionCode(payment.getTransactionCode());
99
+ response.setProduct(tblProduct.getId());
100
+ this.logger.info("url", this.address);
101
+ this.logger.info("header", this.headers);
102
+ this.logger.info("request", request);
103
+ ResponseMobileTransaction responseMobileTransaction = null;
104
+ try {
105
+ ResponseEntity<ResponseMobileTransaction> responseEntity = this.restTemplate.postForEntity(this.address, new HttpEntity<String>(this.gson.toJson(request), headers), ResponseMobileTransaction.class);
106
+ if (responseEntity.getStatusCodeValue() >= 200 && responseEntity.getStatusCodeValue() < 300) {
107
+ responseMobileTransaction = responseEntity.getBody();
108
+ if (responseMobileTransaction.getStatus().trim().toLowerCase().matches("pending")) {
109
+ response.setStatus(TblTransaction.Status.processing);
110
+ } else if (responseMobileTransaction.getStatus().trim().toLowerCase().matches("success")) {
111
+ response.setStatus(TblTransaction.Status.success);
112
+ } else {
113
+ response.setStatus(TblTransaction.Status.failed);
114
+ }
115
+ } else {
116
+ response.setStatus(TblTransaction.Status.failed);
117
+ }
118
+
119
+ } catch (HttpServerErrorException e) {
120
+ response.setStatus(TblTransaction.Status.error);
121
+ } finally {
122
+ response.setMessage(responseMobileTransaction);
123
+ this.logger.info("response", responseMobileTransaction);
124
+ try {
125
+ this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
126
+ } catch (ConnectionDown ex) {
127
+ this.logger.error(ex, ex.getMessage());
128
+ if (this.publisher.reconnect(60, 1000 * 10)) {
129
+ this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
130
+ } else {
131
+ this.logger.info("error", "connection down");
132
+ }
133
+ }
134
+ this.logger.info("result", response);
135
+ }
136
+ }
137
+ } catch (Exception ex) {
138
+ this.logger.error(ex, ex.getMessage());
139
+ }
140
+ }
141
+}
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/service/pulsa/POSTpaid.java
....@@ -0,0 +1,206 @@
1
+package id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.service.pulsa;
2
+
3
+import com.google.gson.Gson;
4
+import id.co.accessmobile.adzanreminder.hutch.tools.LoggerMessage;
5
+import id.co.accessmobile.payment.gateway.database.entity.TblProduct;
6
+import id.co.accessmobile.payment.gateway.database.entity.TblTransaction;
7
+import id.co.accessmobile.payment.gateway.database.repository.ProductRepository;
8
+import id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.Application;
9
+import id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.model.RequestMobile;
10
+import id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.model.ResponseMobileInquirePostpaid;
11
+import id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.model.ResponseMobileTransaction;
12
+import id.co.accessmobile.payment.gateway.model.transaction.RequestInquiry;
13
+import id.co.accessmobile.payment.gateway.model.transaction.RequestPayment;
14
+import id.co.accessmobile.payment.gateway.model.transaction.Response;
15
+import id.co.qhodok.tools.logger.Logger;
16
+import id.co.qhodok.tools.trigger.annotations.Listener;
17
+import id.co.qhodok.tools.trigger.annotations.Subscribe;
18
+import id.co.qhodok.tools.trigger.attributes.State;
19
+import id.co.qhodok.tools.trigger.exceptions.ConnectionDown;
20
+import id.co.qhodok.tools.trigger.processor.Publisher;
21
+import id.co.qhodok.tools.trigger.processor.Subscriber;
22
+import org.springframework.beans.factory.annotation.Autowired;
23
+import org.springframework.beans.factory.annotation.Value;
24
+import org.springframework.http.HttpEntity;
25
+import org.springframework.http.HttpHeaders;
26
+import org.springframework.http.MediaType;
27
+import org.springframework.http.ResponseEntity;
28
+import org.springframework.scheduling.annotation.Scheduled;
29
+import org.springframework.stereotype.Component;
30
+import org.springframework.web.client.HttpServerErrorException;
31
+import org.springframework.web.client.RestTemplate;
32
+
33
+import javax.annotation.PostConstruct;
34
+import java.util.ArrayList;
35
+
36
+/**
37
+ * Created by Permana on 22/12/2017.
38
+ * Software Enginer
39
+ * Access Mobile Indonesia
40
41
+ */
42
[email protected](topic = "PAYMENT.PULSA.POSTPAID")
43
44
+public class POSTpaid {
45
+ @Value("${app.trigger.server.address}")
46
+ protected String triggerAddress;
47
+ @Value("${service.gateway.sepulsa.address}")
48
+ protected String address;
49
+
50
+ @Value("${service.gateway.sepulsa.username}")
51
+ protected String username;
52
+
53
+ @Value("${service.gateway.sepulsa.password}")
54
+ protected String password;
55
+ @Value("${service.gateway.sepulsa.authorization}")
56
+ protected String authorization;
57
+ @Value("${service.gateway.sepulsa.product}")
58
+ protected String product;
59
+
60
+ @Autowired
61
+ protected ProductRepository productRepository;
62
+
63
+ protected Publisher publisher;
64
+ protected Gson gson;
65
+ protected RestTemplate restTemplate;
66
+ protected HttpHeaders headers;
67
+ protected Object paymentKey = new Object();
68
+ protected Object inquiryKey = new Object();
69
+ protected Subscriber inqSubscriber;
70
+ protected Logger logger;
71
+
72
+ @PostConstruct
73
+ public void init() {
74
+ Application.triggerApplication.addSubscriber(this);
75
+ this.publisher = new Publisher(this.triggerAddress);
76
+ this.gson = new Gson();
77
+ this.restTemplate = new RestTemplate();
78
+ this.headers = new HttpHeaders();
79
+ this.headers.setContentType(MediaType.APPLICATION_JSON);
80
+ ArrayList<MediaType> mediaTypes = new ArrayList<>();
81
+ mediaTypes.add(MediaType.APPLICATION_JSON);
82
+ this.headers.setAccept(mediaTypes);
83
+ this.headers.set("Authorization", this.authorization);
84
+ this.headers.set("User-Agent", this.username);
85
+ this.inqSubscriber = new Subscriber(this.triggerAddress);
86
+ this.inqSubscriber.connect("INQUIRY.PULSA.POSTPAID");
87
+ this.logger = new Logger(POSTpaid.class, "ami_mykado_bot", "499520749:AAHUJ5qPWCzFkTZmT0MKShhxYhWNYBIs5Rg", "-263373638");
88
+ }
89
+
90
+ @Scheduled(fixedDelay = 10)
91
+ public void receiveInquiry() throws InterruptedException {
92
+ RequestInquiry requestInquiry = this.inqSubscriber.subscribe(RequestInquiry.class);
93
+ Response response = new Response();
94
+ response.setTransactionCode(requestInquiry.getTransactionCode());
95
+ response.setProduct(requestInquiry.getProduct());
96
+ try {
97
+ this.logger.info("subscribe", requestInquiry);
98
+ ResponseMobileInquirePostpaid responseMobileInquirePostpaid = this.inquiry(requestInquiry);
99
+ if (responseMobileInquirePostpaid != null && responseMobileInquirePostpaid.getCustomer_name() != null && responseMobileInquirePostpaid.getCustomer_no().matches(requestInquiry.getCustomerID())) {
100
+ response.setStatus(TblTransaction.Status.success);
101
+ } else {
102
+ response.setStatus(TblTransaction.Status.failed);
103
+ }
104
+ response.setMessage(responseMobileInquirePostpaid);
105
+ this.logger.info("url",this.address);
106
+ this.logger.info("header",this.headers);
107
+ this.logger.info("result", response);
108
+ } catch (Exception ex) {
109
+ this.logger.error(ex,requestInquiry.getTransactionCode());
110
+ response.setStatus(TblTransaction.Status.error);
111
+ } finally {
112
+ try {
113
+ this.publisher.publish(requestInquiry.getTransactionCode(), response, State.CREATE);
114
+ } catch (ConnectionDown ex) {
115
+ this.logger.error(ex,ex.getMessage());
116
+ if (this.publisher.reconnect(60, 1000 * 10)) {
117
+ this.publisher.publish(requestInquiry.getTransactionCode(), response, State.CREATE);
118
+ } else {
119
+ this.logger.info("error", "connection down");
120
+ }
121
+ }
122
+ }
123
+ }
124
+
125
+ public ResponseMobileInquirePostpaid inquiry(RequestInquiry requestInquiry) {
126
+ this.logger.info("receive", requestInquiry);
127
+ ResponseMobileInquirePostpaid responseMobileInquirePostpaid = null;
128
+ try {
129
+ TblProduct tblProduct = this.productRepository.findByTypeAndNominal(requestInquiry.getProduct(), "", Integer.valueOf(this.product));
130
+ int code = Integer.valueOf(tblProduct.getCode());
131
+ synchronized (this.inquiryKey) {
132
+ RequestMobile request = new RequestMobile();
133
+ request.setProduct_id(code);
134
+ request.setCustomer_number(requestInquiry.getCustomerID());
135
+
136
+ this.logger.info("request", request);
137
+ ResponseEntity<ResponseMobileInquirePostpaid> responseEntity = this.restTemplate.postForEntity(this.address + "inquire/mobile_postpaid.json", new HttpEntity<String>(this.gson.toJson(request), headers), ResponseMobileInquirePostpaid.class);
138
+
139
+ if (responseEntity.getStatusCodeValue() >= 200 && responseEntity.getStatusCodeValue() < 300) {
140
+ responseMobileInquirePostpaid = responseEntity.getBody();
141
+ }
142
+ }
143
+ this.logger.info("response", responseMobileInquirePostpaid);
144
+ } catch (Exception ex) {
145
+ logger.error(ex,requestInquiry.getTransactionCode());
146
+ } finally {
147
+ return responseMobileInquirePostpaid;
148
+ }
149
+
150
+ }
151
+
152
+ @Subscribe(method = State.CREATE, target = RequestPayment.class)
153
+ public void payment(RequestPayment payment) {
154
+ this.logger.info("subscribe", payment);
155
+ try {
156
+ TblProduct tblProduct = this.productRepository.findByTypeAndNominal(payment.getProduct(), "", 2);
157
+ int code = Integer.valueOf(tblProduct.getCode());
158
+ synchronized (this.paymentKey) {
159
+ ResponseMobileInquirePostpaid responseMobileInquirePostpaid = this.inquiry(new RequestInquiry(payment.getTransactionCode(), payment.getProduct(), payment.getCustomerID()));
160
+ RequestMobile request = new RequestMobile();
161
+ request.setCustomer_number(payment.getCustomerID());
162
+ request.setProduct_id(code);
163
+ this.logger.info("request", request);
164
+ Response response = new Response();
165
+ ResponseMobileTransaction responseMobileTransaction = null;
166
+ response.setTransactionCode(payment.getTransactionCode());
167
+ response.setProduct(tblProduct.getId());
168
+ try {
169
+ ResponseEntity<ResponseMobileTransaction> responseEntity = this.restTemplate.postForEntity(this.address, new HttpEntity<String>(this.gson.toJson(request), headers), ResponseMobileTransaction.class);
170
+ if (responseEntity.getStatusCodeValue() >= 200 && responseEntity.getStatusCodeValue() < 300) {
171
+ responseMobileTransaction = responseEntity.getBody();
172
+ if(responseMobileTransaction.getStatus().matches("success")){
173
+ response.setStatus(TblTransaction.Status.success);
174
+ }else if(responseMobileTransaction.getStatus().matches("pending")) {
175
+ response.setStatus(TblTransaction.Status.processing);
176
+ }else{
177
+ response.setStatus(TblTransaction.Status.failed);
178
+ }
179
+ } else {
180
+ response.setStatus(TblTransaction.Status.failed);
181
+ }
182
+ this.logger.info("response", responseMobileTransaction);
183
+ response.setMessage(responseMobileTransaction);
184
+ } catch (HttpServerErrorException e) {
185
+ response.setStatus(TblTransaction.Status.error);
186
+ } finally {
187
+ this.logger.info("result", response);
188
+ try {
189
+ this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
190
+ } catch (ConnectionDown connectionDown) {
191
+ this.logger.error(connectionDown,payment.getTransactionCode());
192
+ if (this.publisher.reconnect(60, 1000 * 10)) {
193
+ this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
194
+ } else {
195
+ this.logger.info("error", "connection down");
196
+ }
197
+ }
198
+ }
199
+ }
200
+ } catch (Exception ex) {
201
+ this.logger.error(ex,payment.getTransactionCode());
202
+ }
203
+ }
204
+
205
+
206
+}
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/sepulsa/service/pulsa/PREpaid.java
....@@ -0,0 +1,140 @@
1
+package id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.service.pulsa;
2
+
3
+import com.google.gson.Gson;
4
+import id.co.accessmobile.adzanreminder.hutch.tools.LoggerMessage;
5
+import id.co.accessmobile.payment.gateway.database.entity.TblProduct;
6
+import id.co.accessmobile.payment.gateway.database.entity.TblTransaction;
7
+import id.co.accessmobile.payment.gateway.database.repository.ProductRepository;
8
+import id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.Application;
9
+import id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.model.RequestMobile;
10
+import id.co.accessmobile.payment.gateway.merchant.pulsa.sepulsa.model.ResponseMobileTransaction;
11
+import id.co.accessmobile.payment.gateway.model.transaction.RequestPayment;
12
+import id.co.accessmobile.payment.gateway.model.transaction.Response;
13
+import id.co.qhodok.tools.logger.Logger;
14
+import id.co.qhodok.tools.trigger.annotations.Listener;
15
+import id.co.qhodok.tools.trigger.annotations.Subscribe;
16
+import id.co.qhodok.tools.trigger.attributes.State;
17
+import id.co.qhodok.tools.trigger.exceptions.ConnectionDown;
18
+import id.co.qhodok.tools.trigger.processor.Publisher;
19
+import org.springframework.beans.factory.annotation.Autowired;
20
+import org.springframework.beans.factory.annotation.Value;
21
+import org.springframework.http.HttpEntity;
22
+import org.springframework.http.HttpHeaders;
23
+import org.springframework.http.MediaType;
24
+import org.springframework.http.ResponseEntity;
25
+import org.springframework.stereotype.Component;
26
+import org.springframework.web.client.RestTemplate;
27
+
28
+import javax.annotation.PostConstruct;
29
+import java.util.ArrayList;
30
+
31
+/**
32
+ * Created by Permana on 22/12/2017.
33
+ * Software Enginer
34
+ * Access Mobile Indonesia
35
36
+ */
37
[email protected](topic = "PAYMENT.PULSA.PREPAID")
38
39
+public class PREpaid {
40
+ @Value("${app.trigger.server.address}")
41
+ protected String triggerAddress;
42
+ @Value("${service.gateway.sepulsa.address}")
43
+ protected String address;
44
+
45
+ @Value("${service.gateway.sepulsa.username}")
46
+ protected String username;
47
+
48
+ @Value("${service.gateway.sepulsa.password}")
49
+ protected String password;
50
+ @Value("${service.gateway.sepulsa.authorization}")
51
+ protected String authorization;
52
+ @Value("${service.gateway.sepulsa.product}")
53
+ protected String merchant;
54
+
55
+ @Autowired
56
+ protected ProductRepository productRepository;
57
+
58
+ protected Publisher publisher;
59
+ protected Gson gson;
60
+ protected RestTemplate restTemplate;
61
+ protected HttpHeaders headers;
62
+ protected Object paymentKey = new Object();
63
+ protected Logger logger;
64
+
65
+ @PostConstruct
66
+ public void init() {
67
+ Application.triggerApplication.addSubscriber(this);
68
+ this.publisher = new Publisher(this.triggerAddress);
69
+ this.gson = new Gson();
70
+ this.restTemplate = new RestTemplate();
71
+ this.headers = new HttpHeaders();
72
+ this.headers.setContentType(MediaType.APPLICATION_JSON);
73
+ ArrayList<MediaType> mediaTypes = new ArrayList<>();
74
+ mediaTypes.add(MediaType.APPLICATION_JSON);
75
+ this.headers.setAccept(mediaTypes);
76
+ this.headers.set("Authorization", "Basic " + this.authorization);
77
+ this.headers.set("User-Agent", this.username);
78
+ this.logger = new Logger(PREpaid.class, "ami_mykado_bot", "499520749:AAHUJ5qPWCzFkTZmT0MKShhxYhWNYBIs5Rg", "-263373638");
79
+ this.address += "transaction/mobile.json";
80
+ }
81
+
82
+ @Subscribe(method = State.CREATE, target = RequestPayment.class)
83
+ public void payment(RequestPayment payment) {
84
+ this.logger.info("subscribe", payment);
85
+ try {
86
+ TblProduct product = this.productRepository.findByTypeAndNominal(payment.getProduct(), payment.getNominal(), Integer.valueOf(this.merchant));
87
+ int code = Integer.valueOf(product.getCode());
88
+ synchronized (this.paymentKey) {
89
+ RequestMobile request = new RequestMobile();
90
+ request.setProduct_id(code);
91
+ request.setCustomer_number(payment.getCustomerID());
92
+ request.setOrder_id(payment.getTransactionCode());
93
+
94
+ this.logger.info("url", this.address);
95
+ this.logger.info("header", this.headers);
96
+ this.logger.info("request", request);
97
+ Response response = new Response();
98
+ ResponseMobileTransaction responseMobileTransaction = new ResponseMobileTransaction();
99
+ response.setTransactionCode(payment.getTransactionCode());
100
+ response.setProduct(product.getId());
101
+
102
+ try {
103
+ ResponseEntity<ResponseMobileTransaction> responseEntity = this.restTemplate.postForEntity(this.address, new HttpEntity<String>(this.gson.toJson(request), headers), ResponseMobileTransaction.class);
104
+ if (responseEntity.getStatusCodeValue() >= 200 && responseEntity.getStatusCodeValue() < 300) {
105
+ responseMobileTransaction = responseEntity.getBody();
106
+ if (responseMobileTransaction.getStatus().trim().toLowerCase().matches("pending")) {
107
+ response.setStatus(TblTransaction.Status.processing);
108
+ } else if (responseMobileTransaction.getStatus().trim().toLowerCase().matches("success")) {
109
+ response.setStatus(TblTransaction.Status.success);
110
+ } else {
111
+ response.setStatus(TblTransaction.Status.failed);
112
+ }
113
+ } else {
114
+ response.setStatus(TblTransaction.Status.failed);
115
+ }
116
+ response.setMessage(responseMobileTransaction);
117
+
118
+ this.logger.info("response", responseMobileTransaction);
119
+ } catch (Exception e) {
120
+ this.logger.error(e, payment.getTransactionCode());
121
+ response.setStatus(TblTransaction.Status.error);
122
+ } finally {
123
+ this.logger.info("result", response);
124
+ try {
125
+ this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
126
+ } catch (ConnectionDown ec) {
127
+ this.logger.error(ec, ec.getMessage());
128
+ if (this.publisher.reconnect(60, 1000 * 10)) {
129
+ this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
130
+ } else {
131
+ this.logger.info("error", "connection down");
132
+ }
133
+ }
134
+ }
135
+ }
136
+ } catch (Exception ex) {
137
+ this.logger.error(ex, payment.getTransactionCode());
138
+ }
139
+ }
140
+}
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/resources/application.properties
....@@ -0,0 +1,26 @@
1
+server.port=8181
2
+
3
+app.trigger.server.address=tcp://localhost:59696
4
+
5
+service.gateway.sepulsa.address=https://horven.sumpahpalapa.com:4433/api/
6
+service.gateway.sepulsa.username=access_mobile
7
+service.gateway.sepulsa.password=HPS_cGrRf6hAFLI0dm2-GwFh1iUTlk5M0OASfF27ACc
8
+service.gateway.sepulsa.authorization=YWNjZXNzX21vYmlsZTpIUFNfY0dyUmY2aEFGTEkwZG0yLUd3RmgxaVVUbGs1TTBPQVNmRjI3QUNj
9
+service.gateway.sepulsa.product=3
10
+
11
+spring.jmx.enabled=false
12
+spring.datasource.url=jdbc:mysql://52.74.234.11:3307/db_payment_gateway
13
+spring.datasource.username=mcoupon
14
+spring.datasource.password=mcoupon
15
+spring.datasource.tomcat.max-wait=20000
16
+spring.datasource.tomcat.max-active=50
17
+spring.datasource.tomcat.max-idle=20
18
+spring.datasource.tomcat.min-idle=15
19
+
20
+spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
21
+spring.jpa.properties.hibernate.id.new_generator_mappings = false
22
+spring.jpa.properties.hibernate.format_sql = true
23
+
24
+spring.http.multipart.max-file-size=128MB
25
+spring.http.multipart.max-request-size=128MB
26
+
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_sepulsa/src/main/resources/logback-spring.xml
....@@ -0,0 +1,18 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<configuration>
3
+
4
+ <property name="LOG_PATTERN"
5
+ value='{"level":"%level","time":"%date","location":"%logger","method":"%M","message":%msg},%n'/>
6
+
7
+ <!-- Send debug messages to System.out -->
8
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
9
+ <!-- By default, encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
10
+ <encoder>
11
+ <pattern>${LOG_PATTERN}</pattern>
12
+ </encoder>
13
+ </appender>
14
+
15
+ <root level="INFO">
16
+ <appender-ref ref="STDOUT"/>
17
+ </root>
18
+</configuration>
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/payment-gateway-merchant-pulsa-triversa.iml
....@@ -23,6 +23,8 @@
2323 <orderEntry type="module" module-name="payment-gateway-model" />
2424 <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:1.5.2.RELEASE" level="project" />
2525 <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.2.RELEASE" level="project" />
26
+ <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
27
+ <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.2.RELEASE" level="project" />
2628 <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.2.RELEASE" level="project" />
2729 <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
2830 <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
....@@ -47,11 +49,6 @@
4749 <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.7.RELEASE" level="project" />
4850 <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
4951 <orderEntry type="module" module-name="payment-gateway-database-service" />
50
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.0.0.RELEASE" level="project" />
51
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
52
- <orderEntry type="module" module-name="payment-gateway-tools" />
53
- <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
54
- <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.4" level="project" />
5552 <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:1.5.2.RELEASE" level="project" />
5653 <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:1.5.2.RELEASE" level="project" />
5754 <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
....@@ -76,8 +73,46 @@
7673 <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.24" level="project" />
7774 <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.7.RELEASE" level="project" />
7875 <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.41" level="project" />
76
+ <orderEntry type="module" module-name="payment-gateway-tools" />
77
+ <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
78
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.4" level="project" />
7979 <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
80
- <orderEntry type="library" name="Maven: id.co.qhodok.tools:trigger:2.0" level="project" />
80
+ <orderEntry type="library" name="Maven: id.co.qhodok.tools:qhodok-tools-logger:1.0" level="project" />
81
+ <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
82
+ <orderEntry type="library" name="Maven: id.co.qhodok.tools:qhodok-tools-telegram:1.0" level="project" />
83
+ <orderEntry type="library" name="Maven: org.telegram:telegrambots:3.5" level="project" />
84
+ <orderEntry type="library" name="Maven: org.telegram:telegrambots-meta:3.5" level="project" />
85
+ <orderEntry type="library" name="Maven: com.google.inject:guice:4.1.0" level="project" />
86
+ <orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
87
+ <orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
88
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.8.7" level="project" />
89
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.8.7" level="project" />
90
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.8.7" level="project" />
91
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-json-jackson:2.25.1" level="project" />
92
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-common:2.25.1" level="project" />
93
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.bundles.repackaged:jersey-guava:2.25.1" level="project" />
94
+ <orderEntry type="library" name="Maven: org.glassfish.hk2:osgi-resource-locator:1.0.1" level="project" />
95
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.ext:jersey-entity-filtering:2.25.1" level="project" />
96
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.containers:jersey-container-grizzly2-http:2.25.1" level="project" />
97
+ <orderEntry type="library" name="Maven: org.glassfish.hk2.external:javax.inject:2.5.0-b32" level="project" />
98
+ <orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-http-server:2.3.28" level="project" />
99
+ <orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-http:2.3.28" level="project" />
100
+ <orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-framework:2.3.28" level="project" />
101
+ <orderEntry type="library" name="Maven: javax.ws.rs:javax.ws.rs-api:2.0.1" level="project" />
102
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-server:2.25.1" level="project" />
103
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-client:2.25.1" level="project" />
104
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-jaxb:2.25.1" level="project" />
105
+ <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.2" level="project" />
106
+ <orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-api:2.5.0-b32" level="project" />
107
+ <orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-utils:2.5.0-b32" level="project" />
108
+ <orderEntry type="library" name="Maven: org.glassfish.hk2.external:aopalliance-repackaged:2.5.0-b32" level="project" />
109
+ <orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-locator:2.5.0-b32" level="project" />
110
+ <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.3" level="project" />
111
+ <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.6" level="project" />
112
+ <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
113
+ <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.3" level="project" />
114
+ <orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
115
+ <orderEntry type="library" name="Maven: id.co.qhodok.tools:qhodok-tools-trigger:1.0" level="project" />
81116 <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
82117 <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
83118 <orderEntry type="library" name="Maven: org.zeromq:jeromq:0.4.2" level="project" />
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/pom.xml
....@@ -26,11 +26,6 @@
2626 <artifactId>payment-gateway-database-service</artifactId>
2727 <version>1.0</version>
2828 </dependency>
29
- <dependency>
30
- <groupId>org.springframework.boot</groupId>
31
- <artifactId>spring-boot-autoconfigure</artifactId>
32
- <version>2.0.0.RELEASE</version>
33
- </dependency>
3429 </dependencies>
3530
3631 <build>
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/triversa/services/ResponseCallback.java
....@@ -1,16 +1,14 @@
11 package id.co.accessmobile.payment.gateway.merchant.pulsa.triversa.services;
22
33 import com.google.gson.Gson;
4
-import id.co.accessmobile.adzanreminder.hutch.tools.LoggerMessage;
54 import id.co.accessmobile.payment.gateway.database.entity.TblTransaction;
65 import id.co.accessmobile.payment.gateway.merchant.pulsa.triversa.model.ResponsePulsaPrepaid;
76 import id.co.accessmobile.payment.gateway.model.transaction.RequestPayment;
87 import id.co.accessmobile.payment.gateway.model.transaction.Response;
8
+import id.co.qhodok.tools.logger.Logger;
99 import id.co.qhodok.tools.trigger.attributes.State;
1010 import id.co.qhodok.tools.trigger.exceptions.ConnectionDown;
1111 import id.co.qhodok.tools.trigger.processor.Publisher;
12
-import org.slf4j.Logger;
13
-import org.slf4j.LoggerFactory;
1412 import org.springframework.beans.factory.annotation.Value;
1513 import org.springframework.http.HttpStatus;
1614 import org.springframework.http.ResponseEntity;
....@@ -33,7 +31,6 @@
3331
3432 @Value("${app.trigger.server.address}")
3533 protected String address;
36
- protected String loggingPattern;
3734 protected Publisher publisher;
3835 protected Logger logger;
3936 protected Gson gson;
....@@ -44,13 +41,13 @@
4441 public void init() {
4542 this.gson = new Gson();
4643 this.publisher = new Publisher(this.address);
47
- this.logger = LoggerFactory.getLogger(ResponseCallback.class);
44
+ this.logger = new Logger(ResponseCallback.class,"ami_mykado_bot", "499520749:AAHUJ5qPWCzFkTZmT0MKShhxYhWNYBIs5Rg", "-263373638");
4845 }
4946
5047
5148 @RequestMapping(value = "/response", method = RequestMethod.POST)
5249 public ResponseEntity<String> callback(@RequestBody ResponsePulsaPrepaid responsePulsaPrepaid) {
53
- this.logger.info(this.gson.toJson(new LoggerMessage<ResponsePulsaPrepaid>("response", responsePulsaPrepaid)));
50
+ this.logger.info("response", responsePulsaPrepaid);
5451 ResponseEntity<String> responseEntity = null;
5552 try {
5653 if (noTrans.containsKey(responsePulsaPrepaid.getNtrans())) {
....@@ -66,21 +63,21 @@
6663 try {
6764 this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
6865 } catch (ConnectionDown ex) {
69
- this.logger.error(ex.getMessage(), ex);
66
+ this.logger.error( ex,ex.getMessage());
7067 if (this.publisher.reconnect(60, 1000 * 10)) {
7168 this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
7269 } else {
73
- this.logger.info(this.gson.toJson(new LoggerMessage<String>("error", "connection down")));
70
+ this.logger.info("error", "connection down");
7471 }
7572 }
76
- this.logger.info(this.gson.toJson(new LoggerMessage<Response>("result", response)));
73
+ this.logger.info("result", response);
7774 responseEntity = new ResponseEntity<String>("SUCCESS", HttpStatus.OK);
7875 } else {
79
- this.logger.info(this.gson.toJson(new LoggerMessage<String>("error", "no transaction registered")));
76
+ this.logger.info("error", "no transaction registered");
8077 responseEntity = new ResponseEntity<String>("FAILED", HttpStatus.OK);
8178 }
8279 } catch (Exception ex) {
83
- this.logger.error(ex.getMessage(), ex);
80
+ this.logger.error(ex,ex.getMessage());
8481 responseEntity = new ResponseEntity<String>("FAILED", HttpStatus.OK);
8582 } finally {
8683 return responseEntity;
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/triversa/services/data/Data.java
....@@ -11,13 +11,12 @@
1111 import id.co.accessmobile.payment.gateway.merchant.pulsa.triversa.services.ResponseCallback;
1212 import id.co.accessmobile.payment.gateway.model.transaction.RequestPayment;
1313 import id.co.accessmobile.payment.gateway.model.transaction.Response;
14
+import id.co.qhodok.tools.logger.Logger;
1415 import id.co.qhodok.tools.trigger.annotations.Listener;
1516 import id.co.qhodok.tools.trigger.annotations.Subscribe;
1617 import id.co.qhodok.tools.trigger.attributes.State;
1718 import id.co.qhodok.tools.trigger.exceptions.ConnectionDown;
1819 import id.co.qhodok.tools.trigger.processor.Publisher;
19
-import org.slf4j.Logger;
20
-import org.slf4j.LoggerFactory;
2120 import org.springframework.beans.factory.annotation.Autowired;
2221 import org.springframework.beans.factory.annotation.Value;
2322 import org.springframework.http.HttpEntity;
....@@ -80,7 +79,7 @@
8079 mediaTypes.add(MediaType.APPLICATION_JSON);
8180 this.headers.setAccept(mediaTypes);
8281 this.headers.set("userid", this.username);
83
- this.logger = LoggerFactory.getLogger(Data.class);
82
+ this.logger = new Logger(Data.class,"ami_mykado_bot", "499520749:AAHUJ5qPWCzFkTZmT0MKShhxYhWNYBIs5Rg", "-263373638");
8483 }
8584
8685 protected String sha1(String input) throws NoSuchAlgorithmException {
....@@ -100,7 +99,7 @@
10099
101100 @Subscribe(method = State.CREATE, target = RequestPayment.class)
102101 public void payment(RequestPayment payment) {
103
- this.logger.info(this.gson.toJson(new LoggerMessage<RequestPayment>("subscribe", payment)));
102
+ this.logger.info("subscribe", payment);
104103 try {
105104 TblProduct tblProduct = this.productRepository.findByTypeAndNominal(payment.getProduct(), payment.getNominal(), 2);
106105 String code = tblProduct.getCode();
....@@ -117,7 +116,7 @@
117116 response.setTransactionCode(payment.getTransactionCode());
118117 response.setProduct(tblProduct.getId());
119118 ResponsePulsaPrepaid responsePulsaPrepaid = new ResponsePulsaPrepaid();
120
- this.logger.info(this.gson.toJson(new LoggerMessage<Request>("request", request)));
119
+ this.logger.info("request", request);
121120 try {
122121 ResponseEntity<String> responseEntity = this.restTemplate.postForEntity(this.address, new HttpEntity<String>(this.gson.toJson(request), headers), String.class);
123122 if (responseEntity.getStatusCodeValue() == 200) {
....@@ -138,22 +137,22 @@
138137 response.setStatus(TblTransaction.Status.error);
139138 }finally {
140139 response.setMessage(responsePulsaPrepaid);
141
- this.logger.info(this.gson.toJson(new LoggerMessage<ResponsePulsaPrepaid>("response", responsePulsaPrepaid)));
140
+ this.logger.info("response", responsePulsaPrepaid);
142141 try {
143142 this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
144143 } catch (ConnectionDown ex) {
145
- this.logger.error(ex.getMessage(), ex);
144
+ this.logger.error(ex,ex.getMessage());
146145 if (this.publisher.reconnect(60, 1000 * 10)) {
147146 this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
148147 } else {
149
- this.logger.info(this.gson.toJson(new LoggerMessage<String>("error", "connection down")));
148
+ this.logger.info("error", "connection down");
150149 }
151150 }
152
- this.logger.info(this.gson.toJson(new LoggerMessage<Response>("result", response)));
151
+ this.logger.info("result", response);
153152 }
154153 }
155154 }catch (Exception ex){
156
- this.logger.error(ex.getMessage(),ex);
155
+ this.logger.error(ex,ex.getMessage());
157156 }
158157 }
159158 }
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/triversa/services/pulsa/POSTpaid.java
....@@ -1,7 +1,6 @@
11 package id.co.accessmobile.payment.gateway.merchant.pulsa.triversa.services.pulsa;
22
33 import com.google.gson.Gson;
4
-import id.co.accessmobile.adzanreminder.hutch.tools.LoggerMessage;
54 import id.co.accessmobile.payment.gateway.database.entity.TblProduct;
65 import id.co.accessmobile.payment.gateway.database.entity.TblTransaction;
76 import id.co.accessmobile.payment.gateway.database.repository.ProductRepository;
....@@ -13,14 +12,13 @@
1312 import id.co.accessmobile.payment.gateway.model.transaction.RequestInquiry;
1413 import id.co.accessmobile.payment.gateway.model.transaction.RequestPayment;
1514 import id.co.accessmobile.payment.gateway.model.transaction.Response;
15
+import id.co.qhodok.tools.logger.Logger;
1616 import id.co.qhodok.tools.trigger.annotations.Listener;
1717 import id.co.qhodok.tools.trigger.annotations.Subscribe;
1818 import id.co.qhodok.tools.trigger.attributes.State;
1919 import id.co.qhodok.tools.trigger.exceptions.ConnectionDown;
2020 import id.co.qhodok.tools.trigger.processor.Publisher;
2121 import id.co.qhodok.tools.trigger.processor.Subscriber;
22
-import org.slf4j.Logger;
23
-import org.slf4j.LoggerFactory;
2422 import org.springframework.beans.factory.annotation.Autowired;
2523 import org.springframework.beans.factory.annotation.Value;
2624 import org.springframework.http.HttpEntity;
....@@ -87,7 +85,7 @@
8785 this.headers.set("userid", this.username);
8886 this.inqSubscriber = new Subscriber(this.triggerAddress);
8987 this.inqSubscriber.connect("INQUIRY.PULSA.POSTPAID");
90
- this.logger = LoggerFactory.getLogger(POSTpaid.class);
88
+ this.logger = new Logger(POSTpaid.class, "ami_mykado_bot", "499520749:AAHUJ5qPWCzFkTZmT0MKShhxYhWNYBIs5Rg", "-263373638");
9189 }
9290
9391 protected String sha1(String input) throws NoSuchAlgorithmException {
....@@ -112,7 +110,7 @@
112110 response.setTransactionCode(requestInquiry.getTransactionCode());
113111 response.setProduct(0);
114112 try {
115
- this.logger.info(this.gson.toJson(new LoggerMessage<RequestInquiry>("subscribe", requestInquiry)));
113
+ this.logger.info("subscribe", requestInquiry);
116114 ResponsePulsaPostpaidInquiry responsePulsaPostpaidInquiry = this.inquiry(requestInquiry);
117115 if (responsePulsaPostpaidInquiry != null) {
118116 if (responsePulsaPostpaidInquiry.getStatus().trim().toLowerCase().matches("0000")) {
....@@ -124,26 +122,26 @@
124122 response.setStatus(TblTransaction.Status.failed);
125123 }
126124 response.setMessage(responsePulsaPostpaidInquiry);
127
- this.logger.info(this.gson.toJson(new LoggerMessage<Response>("result", response)));
125
+ this.logger.info("result", response);
128126 } catch (Exception ex) {
129
- this.logger.error(ex.getMessage(), ex);
127
+ this.logger.error(ex, ex.getMessage());
130128 response.setStatus(TblTransaction.Status.error);
131129 } finally {
132130 try {
133131 this.publisher.publish(requestInquiry.getTransactionCode(), response, State.CREATE);
134132 } catch (ConnectionDown ex) {
135
- this.logger.error(ex.getMessage(), ex);
133
+ this.logger.error(ex, ex.getMessage());
136134 if (this.publisher.reconnect(60, 1000 * 10)) {
137135 this.publisher.publish(requestInquiry.getTransactionCode(), response, State.CREATE);
138136 } else {
139
- this.logger.info(this.gson.toJson(new LoggerMessage<String>("error", "connection down")));
137
+ this.logger.info("error", "connection down");
140138 }
141139 }
142140 }
143141 }
144142
145143 public ResponsePulsaPostpaidInquiry inquiry(RequestInquiry requestInquiry) {
146
- this.logger.info(this.gson.toJson(new LoggerMessage<RequestInquiry>("receive", requestInquiry)));
144
+ this.logger.info("receive", requestInquiry);
147145 ResponsePulsaPostpaidInquiry responsePulsaPostpaidInquiry = null;
148146 try {
149147 TblProduct tblProduct = this.productRepository.findByTypeAndNominal(requestInquiry.getProduct(), "", 2);
....@@ -158,16 +156,16 @@
158156 request.setMSSIDN(requestInquiry.getCustomerID());
159157 request.setPRODUCT(code);
160158
161
- this.logger.info(this.gson.toJson(new LoggerMessage<Request>("request", request)));
159
+ this.logger.info("request", request);
162160 ResponseEntity<String> responseEntity = this.restTemplate.postForEntity(this.address, new HttpEntity<String>(this.gson.toJson(request), headers), String.class);
163161
164162 if (responseEntity.getStatusCodeValue() == 200) {
165163 responsePulsaPostpaidInquiry = this.gson.fromJson(responseEntity.getBody(), ResponsePulsaPostpaidInquiry.class);
166164 }
167165 }
168
- this.logger.info(this.gson.toJson(new LoggerMessage<ResponsePulsaPostpaidInquiry>("response", responsePulsaPostpaidInquiry)));
166
+ this.logger.info("response", responsePulsaPostpaidInquiry);
169167 } catch (Exception ex) {
170
- logger.error(ex.getMessage(), ex);
168
+ logger.error(ex, ex.getMessage());
171169 } finally {
172170 return responsePulsaPostpaidInquiry;
173171 }
....@@ -176,7 +174,7 @@
176174
177175 @Subscribe(method = State.CREATE, target = RequestPayment.class)
178176 public void payment(RequestPayment payment) {
179
- this.logger.info(this.gson.toJson(new LoggerMessage<RequestPayment>("subscribe", payment)));
177
+ this.logger.info("subscribe", payment);
180178 try {
181179 TblProduct tblProduct = this.productRepository.findByTypeAndNominal(payment.getProduct(), "", 2);
182180 String code = tblProduct.getCode();
....@@ -191,7 +189,7 @@
191189 request.setMSSIDN(payment.getCustomerID());
192190 request.setPRODUCT(code);
193191 request.setNTRANS(inquiry.getNtrans());
194
- this.logger.info(this.gson.toJson(new LoggerMessage<Request>("request", request)));
192
+ this.logger.info("request", request);
195193 Response response = new Response();
196194 ResponsePulsaPostpaidPayment responsePulsaPostpaidPayment = null;
197195 response.setTransactionCode(payment.getTransactionCode());
....@@ -209,26 +207,26 @@
209207 } else {
210208 response.setStatus(TblTransaction.Status.failed);
211209 }
212
- this.logger.info(this.gson.toJson(new LoggerMessage<ResponsePulsaPostpaidPayment>("response", responsePulsaPostpaidPayment)));
210
+ this.logger.info("response", responsePulsaPostpaidPayment);
213211 response.setMessage(responsePulsaPostpaidPayment);
214
- }catch (HttpServerErrorException e){
212
+ } catch (HttpServerErrorException e) {
215213 response.setStatus(TblTransaction.Status.error);
216
- }finally {
217
- this.logger.info(this.gson.toJson(new LoggerMessage<Response>("result", response)));
214
+ } finally {
215
+ this.logger.info("result", response);
218216 try {
219217 this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
220218 } catch (ConnectionDown connectionDown) {
221
- this.logger.error(connectionDown.getMessage(), connectionDown);
219
+ this.logger.error(connectionDown, connectionDown.getMessage());
222220 if (this.publisher.reconnect(60, 1000 * 10)) {
223221 this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
224222 } else {
225
- this.logger.info(this.gson.toJson(new LoggerMessage<String>("error", "connection down")));
223
+ this.logger.info("error", "connection down");
226224 }
227225 }
228226 }
229227 }
230228 } catch (Exception ex) {
231
- this.logger.error(ex.getMessage(), ex);
229
+ this.logger.error(ex, ex.getMessage());
232230 }
233231 }
234232
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/java/id/co/accessmobile/payment/gateway/merchant/pulsa/triversa/services/pulsa/PREpaid.java
....@@ -11,13 +11,12 @@
1111 import id.co.accessmobile.payment.gateway.merchant.pulsa.triversa.services.ResponseCallback;
1212 import id.co.accessmobile.payment.gateway.model.transaction.RequestPayment;
1313 import id.co.accessmobile.payment.gateway.model.transaction.Response;
14
+import id.co.qhodok.tools.logger.Logger;
1415 import id.co.qhodok.tools.trigger.annotations.Listener;
1516 import id.co.qhodok.tools.trigger.annotations.Subscribe;
1617 import id.co.qhodok.tools.trigger.attributes.State;
1718 import id.co.qhodok.tools.trigger.exceptions.ConnectionDown;
1819 import id.co.qhodok.tools.trigger.processor.Publisher;
19
-import org.slf4j.Logger;
20
-import org.slf4j.LoggerFactory;
2120 import org.springframework.beans.factory.annotation.Autowired;
2221 import org.springframework.beans.factory.annotation.Value;
2322 import org.springframework.http.HttpEntity;
....@@ -79,7 +78,7 @@
7978 mediaTypes.add(MediaType.APPLICATION_JSON);
8079 this.headers.setAccept(mediaTypes);
8180 this.headers.set("userid", this.username);
82
- this.logger = LoggerFactory.getLogger(PREpaid.class);
81
+ this.logger = new Logger(PREpaid.class, "ami_mykado_bot", "499520749:AAHUJ5qPWCzFkTZmT0MKShhxYhWNYBIs5Rg", "-263373638");
8382 }
8483
8584 protected String sha1(String input) throws NoSuchAlgorithmException {
....@@ -99,7 +98,7 @@
9998
10099 @Subscribe(method = State.CREATE, target = RequestPayment.class)
101100 public void payment(RequestPayment payment) {
102
- this.logger.info(this.gson.toJson(new LoggerMessage<RequestPayment>("subscribe", payment)));
101
+ this.logger.info("subscribe", payment);
103102 try {
104103 TblProduct product = this.productRepository.findByTypeAndNominal(payment.getProduct(), payment.getNominal(), 2);
105104 String code = product.getCode();
....@@ -113,7 +112,7 @@
113112 request.setMSSIDN(payment.getCustomerID());
114113 request.setPRODUCT(code);
115114
116
- this.logger.info(this.gson.toJson(new LoggerMessage<Request>("request", request)));
115
+ this.logger.info("request", request);
117116 Response response = new Response();
118117 ResponsePulsaPrepaid responsePulsaPrepaid = new ResponsePulsaPrepaid();
119118 response.setTransactionCode(payment.getTransactionCode());
....@@ -136,25 +135,25 @@
136135 }
137136 response.setMessage(responsePulsaPrepaid);
138137
139
- this.logger.info(this.gson.toJson(new LoggerMessage<ResponsePulsaPrepaid>("response", responsePulsaPrepaid)));
138
+ this.logger.info("response", responsePulsaPrepaid);
140139 } catch (HttpServerErrorException e) {
141140 response.setStatus(TblTransaction.Status.error);
142
- }finally {
143
- this.logger.info(this.gson.toJson(new LoggerMessage<Response>("result", response)));
141
+ } finally {
142
+ this.logger.info("result", response);
144143 try {
145144 this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
146145 } catch (ConnectionDown ec) {
147
- this.logger.error(ec.getMessage(), ec);
146
+ this.logger.error(ec, ec.getMessage());
148147 if (this.publisher.reconnect(60, 1000 * 10)) {
149148 this.publisher.publish("RESULT.PAYMENT", response, State.CREATE);
150149 } else {
151
- this.logger.info(this.gson.toJson(new LoggerMessage<String>("error", "connection down")));
150
+ this.logger.info("error", "connection down");
152151 }
153152 }
154153 }
155154 }
156155 } catch (Exception ex) {
157
- this.logger.error(ex.getMessage(), ex);
156
+ this.logger.error(ex, ex.getMessage());
158157 }
159158 }
160159 }
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/resources/application-dev.properties
deleted file mode 100644
....@@ -1,30 +0,0 @@
1
-server.port=8181
2
-
3
-app.trigger.server.address=tcp://localhost:59696
4
-
5
-service.gateway.triversa.address=http://localhost:10005/api/v1
6
-service.gateway.triversa.username=AMI
7
8
-service.gateway.triversa.product=2
9
-
10
-spring.jmx.enabled=false
11
-spring.datasource.url=jdbc:mysql://52.74.234.11:3307/db_payment_gateway
12
-spring.datasource.username=mcoupon
13
-spring.datasource.password=mcoupon
14
-spring.datasource.tomcat.max-wait=20000
15
-spring.datasource.tomcat.max-active=50
16
-spring.datasource.tomcat.max-idle=20
17
-spring.datasource.tomcat.min-idle=15
18
-
19
-spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
20
-spring.jpa.properties.hibernate.id.new_generator_mappings = false
21
-spring.jpa.properties.hibernate.format_sql = true
22
-
23
-logging.level.org.hibernate.SQL=DEBUG
24
-logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
25
-
26
-spring.http.multipart.max-file-size=128MB
27
-spring.http.multipart.max-request-size=128MB
28
-
29
-logging.file=C:\\AMCloud\\Project\\ECOMMERS\\payment_gateway\\log\\triversa\\
30
-logging.pattern={"level":"%level","time":"%date","location":"%logger","method":"%M","message":"%msg"}%n
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/resources/application.properties
....@@ -1 +1,30 @@
1
-spring.profiles.active=prod
1
+server.port=8181
2
+
3
+app.trigger.server.address=tcp://localhost:59696
4
+
5
+service.gateway.triversa.address=http://localhost:10005/api/v1
6
+service.gateway.triversa.username=AMI
7
8
+service.gateway.triversa.product=2
9
+
10
+spring.jmx.enabled=false
11
+spring.datasource.url=jdbc:mysql://52.74.234.11:3307/db_payment_gateway
12
+spring.datasource.username=mcoupon
13
+spring.datasource.password=mcoupon
14
+spring.datasource.tomcat.max-wait=20000
15
+spring.datasource.tomcat.max-active=50
16
+spring.datasource.tomcat.max-idle=20
17
+spring.datasource.tomcat.min-idle=15
18
+
19
+spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
20
+spring.jpa.properties.hibernate.id.new_generator_mappings = false
21
+spring.jpa.properties.hibernate.format_sql = true
22
+
23
+logging.level.org.hibernate.SQL=DEBUG
24
+logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
25
+
26
+spring.http.multipart.max-file-size=128MB
27
+spring.http.multipart.max-request-size=128MB
28
+
29
+logging.file=C:\\AMCloud\\Project\\ECOMMERS\\payment_gateway\\log\\triversa\\
30
+logging.pattern={"level":"%level","time":"%date","location":"%logger","method":"%M","message":"%msg"}%n
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/resources/logback-spring.xml
....@@ -1,21 +1,8 @@
11 <?xml version="1.0" encoding="UTF-8"?>
22 <configuration>
33
4
- <property name="LOG_PATTERN"
5
- value='{"level":"%level","time":"%date","location":"%logger","method":"%M","message":"%msg"},%n'/>
6
- <springProfile name="dev">
7
- <property name="LOG_PATH" value="~/drive/amcloud/Project/ECOMMERS/payment_gateway/log/"/>
8
- </springProfile>
9
- <springProfile name="prod">
10
- <property name="LOG_PATH" value="/home/ami/mykado/payment/log/triversa/"/>
11
- </springProfile>
12
- <!-- Send debug messages to System.out -->
13
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
14
- <!-- By default, encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
15
- <encoder>
16
- <pattern>${LOG_PATTERN}</pattern>
17
- </encoder>
18
- </appender>
4
+ <property name="LOG_PATTERN" value='{"level":"%level","time":"%date","location":"%logger","method":"%M","message":"%msg"}'/>
5
+ <property name="LOG_PATH" value="/home/ami/mykado/payment/log/sepulsa/"/>
196
207 <!-- Send debug message to file -->
218 <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
....@@ -54,12 +41,7 @@
5441 </appender>
5542
5643 <root level="INFO">
57
- <springProfile name="dev">
58
- <appender-ref ref="STDOUT"/>
59
- </springProfile>
60
- <springProfile name="prod">
61
- <appender-ref ref="FILE"/>
62
- <appender-ref ref="DB"/>
63
- </springProfile>
44
+ <appender-ref ref="FILE"/>
45
+ <appender-ref ref="DB"/>
6446 </root>
6547 </configuration>
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/payment_gateway_merchant_pulsa_triversa/src/main/resources/logback-spring2.xml
....@@ -0,0 +1,65 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<configuration>
3
+
4
+ <property name="LOG_PATTERN"
5
+ value='{"level":"%level","time":"%date","location":"%logger","method":"%M","message":"%msg"}'/>
6
+ <springProfile name="dev">
7
+ <property name="LOG_PATH" value="~/drive/amcloud/Project/ECOMMERS/payment_gateway/log/"/>
8
+ </springProfile>
9
+ <springProfile name="prod">
10
+ <property name="LOG_PATH" value="/home/ami/mykado/payment/log/triversa/"/>
11
+ </springProfile>
12
+ <!-- Send debug messages to System.out -->
13
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
14
+ <!-- By default, encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
15
+ <encoder>
16
+ <pattern>${LOG_PATTERN}</pattern>
17
+ </encoder>
18
+ </appender>
19
+
20
+ <!-- Send debug message to file -->
21
+ <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
22
+ <file>${LOG_PATH}/log.log</file>
23
+
24
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
25
+ <pattern>${LOG_PATTERN}</pattern>
26
+ </encoder>
27
+
28
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
29
+ <fileNamePattern>${LOG_PATH}/log-%i-%d{yyyyMMdd}.log</fileNamePattern>
30
+
31
+ <!-- each file should be at most 10MB, keep 90 days worth of history -->
32
+ <maxHistory>90</maxHistory>
33
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
34
+ <maxFileSize>10MB</maxFileSize>
35
+ </timeBasedFileNamingAndTriggeringPolicy>
36
+ </rollingPolicy>
37
+ </appender>
38
+
39
+ <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
40
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
41
+ <level>ERROR</level>
42
+ </filter>
43
+ <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
44
+ <driverClass>com.mysql.jdbc.Driver</driverClass>
45
+ <springProfile name="dev">
46
+ <url>jdbc:mysql://52.74.234.11:3307/db_payment_gateway</url>
47
+ </springProfile>
48
+ <springProfile name="prod">
49
+ <url>jdbc:mysql://172.31.4.96:3307/db_payment_gateway</url>
50
+ </springProfile>
51
+ <user>mcoupon</user>
52
+ <password>mcoupon</password>
53
+ </connectionSource>
54
+ </appender>
55
+
56
+ <root level="INFO">
57
+ <springProfile name="dev">
58
+ <appender-ref ref="STDOUT"/>
59
+ </springProfile>
60
+ <springProfile name="prod">
61
+ <appender-ref ref="FILE"/>
62
+ <appender-ref ref="DB"/>
63
+ </springProfile>
64
+ </root>
65
+</configuration>
payment_gateway_merchant_list/payment_gateway_merchant_pulsa/pom.xml
....@@ -13,6 +13,7 @@
1313 <packaging>pom</packaging>
1414 <modules>
1515 <module>payment_gateway_merchant_pulsa_triversa</module>
16
+ <module>payment_gateway_merchant_pulsa_sepulsa</module>
1617 </modules>
1718
1819
payment_gateway_merchant_list/pom.xml
....@@ -16,6 +16,15 @@
1616 <module>payment_gateway_merchant_pulsa</module>
1717 </modules>
1818 <dependencies>
19
+ <!-- database -->
20
+ <dependency>
21
+ <groupId>org.springframework.boot</groupId>
22
+ <artifactId>spring-boot-starter-data-jpa</artifactId>
23
+ </dependency>
24
+ <dependency>
25
+ <groupId>mysql</groupId>
26
+ <artifactId>mysql-connector-java</artifactId>
27
+ </dependency>
1928 <dependency>
2029 <groupId>id.co.accessmobile.payment.gateway</groupId>
2130 <artifactId>payment-gateway-tools</artifactId>
payment_gateway_model/payment-gateway-model.iml
....@@ -1,6 +1,11 @@
11 <?xml version="1.0" encoding="UTF-8"?>
22 <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
3
+ <component name="FacetManager">
4
+ <facet type="Spring" name="Spring">
5
+ <configuration />
6
+ </facet>
7
+ </component>
8
+ <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
49 <output url="file://$MODULE_DIR$/target/classes" />
510 <output-test url="file://$MODULE_DIR$/target/test-classes" />
611 <content url="file://$MODULE_DIR$">
....@@ -10,19 +15,7 @@
1015 <orderEntry type="inheritedJdk" />
1116 <orderEntry type="sourceFolder" forTests="false" />
1217 <orderEntry type="module" module-name="payment-gateway-database-service" />
13
- <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
14
- <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.0" level="project" />
1518 <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:1.5.2.RELEASE" level="project" />
16
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.2.RELEASE" level="project" />
17
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
18
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.2.RELEASE" level="project" />
19
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.2.RELEASE" level="project" />
20
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
21
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
22
- <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.24" level="project" />
23
- <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.24" level="project" />
24
- <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
25
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
2619 <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:1.5.2.RELEASE" level="project" />
2720 <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
2821 <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
....@@ -33,7 +26,6 @@
3326 <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.0.12.Final" level="project" />
3427 <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
3528 <orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final" level="project" />
36
- <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
3729 <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
3830 <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.0.Final" level="project" />
3931 <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
....@@ -51,10 +43,61 @@
5143 <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.24" level="project" />
5244 <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.7.RELEASE" level="project" />
5345 <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.41" level="project" />
46
+ <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
47
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.4" level="project" />
5448 <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
55
- <orderEntry type="library" name="Maven: id.co.qhodok.tools:trigger:2.0" level="project" />
49
+ <orderEntry type="library" name="Maven: id.co.qhodok.tools:qhodok-tools-logger:1.0" level="project" />
50
+ <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.2.RELEASE" level="project" />
51
+ <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
52
+ <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.2.RELEASE" level="project" />
53
+ <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.2.RELEASE" level="project" />
54
+ <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
55
+ <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
56
+ <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.24" level="project" />
57
+ <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.24" level="project" />
58
+ <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
59
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
60
+ <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
61
+ <orderEntry type="library" name="Maven: id.co.qhodok.tools:qhodok-tools-telegram:1.0" level="project" />
62
+ <orderEntry type="library" name="Maven: org.telegram:telegrambots:3.5" level="project" />
63
+ <orderEntry type="library" name="Maven: org.telegram:telegrambots-meta:3.5" level="project" />
64
+ <orderEntry type="library" name="Maven: com.google.inject:guice:4.1.0" level="project" />
65
+ <orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
66
+ <orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
67
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
68
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.8.7" level="project" />
69
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.8.7" level="project" />
70
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.8.7" level="project" />
71
+ <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.7" level="project" />
72
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-json-jackson:2.25.1" level="project" />
73
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-common:2.25.1" level="project" />
74
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.bundles.repackaged:jersey-guava:2.25.1" level="project" />
75
+ <orderEntry type="library" name="Maven: org.glassfish.hk2:osgi-resource-locator:1.0.1" level="project" />
76
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.ext:jersey-entity-filtering:2.25.1" level="project" />
77
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.containers:jersey-container-grizzly2-http:2.25.1" level="project" />
78
+ <orderEntry type="library" name="Maven: org.glassfish.hk2.external:javax.inject:2.5.0-b32" level="project" />
79
+ <orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-http-server:2.3.28" level="project" />
80
+ <orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-http:2.3.28" level="project" />
81
+ <orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-framework:2.3.28" level="project" />
82
+ <orderEntry type="library" name="Maven: javax.ws.rs:javax.ws.rs-api:2.0.1" level="project" />
83
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-server:2.25.1" level="project" />
84
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-client:2.25.1" level="project" />
85
+ <orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-jaxb:2.25.1" level="project" />
86
+ <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.2" level="project" />
87
+ <orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-api:2.5.0-b32" level="project" />
88
+ <orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-utils:2.5.0-b32" level="project" />
89
+ <orderEntry type="library" name="Maven: org.glassfish.hk2.external:aopalliance-repackaged:2.5.0-b32" level="project" />
90
+ <orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-locator:2.5.0-b32" level="project" />
91
+ <orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
92
+ <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.3" level="project" />
93
+ <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.6" level="project" />
94
+ <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
95
+ <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.3" level="project" />
96
+ <orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
97
+ <orderEntry type="library" name="Maven: id.co.qhodok.tools:qhodok-tools-trigger:1.0" level="project" />
5698 <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
5799 <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
100
+ <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
58101 <orderEntry type="library" name="Maven: org.zeromq:jeromq:0.4.2" level="project" />
59102 <orderEntry type="library" name="Maven: org.zeromq:jnacl:0.1.0" level="project" />
60103 </component>
payment_gateway_tools/payment-gateway-tools.iml
deleted file mode 100644
....@@ -1,60 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
4
- <output url="file://$MODULE_DIR$/target/classes" />
5
- <output-test url="file://$MODULE_DIR$/target/test-classes" />
6
- <content url="file://$MODULE_DIR$">
7
- <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
- <excludeFolder url="file://$MODULE_DIR$/target" />
9
- </content>
10
- <orderEntry type="inheritedJdk" />
11
- <orderEntry type="sourceFolder" forTests="false" />
12
- <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
13
- <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.0" level="project" />
14
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:1.5.2.RELEASE" level="project" />
15
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.2.RELEASE" level="project" />
16
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
17
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.2.RELEASE" level="project" />
18
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.2.RELEASE" level="project" />
19
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
20
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
21
- <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.24" level="project" />
22
- <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.24" level="project" />
23
- <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
24
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
25
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:1.5.2.RELEASE" level="project" />
26
- <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
27
- <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
28
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.2.RELEASE" level="project" />
29
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.11" level="project" />
30
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.11" level="project" />
31
- <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.7.RELEASE" level="project" />
32
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.0.12.Final" level="project" />
33
- <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
34
- <orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final" level="project" />
35
- <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
36
- <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
37
- <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.0.Final" level="project" />
38
- <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
39
- <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.1.Final" level="project" />
40
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-entitymanager:5.0.12.Final" level="project" />
41
- <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.2" level="project" />
42
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:1.11.1.RELEASE" level="project" />
43
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.1.RELEASE" level="project" />
44
- <orderEntry type="library" name="Maven: org.springframework:spring-orm:4.3.7.RELEASE" level="project" />
45
- <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.7.RELEASE" level="project" />
46
- <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
47
- <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.7.RELEASE" level="project" />
48
- <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.7.RELEASE" level="project" />
49
- <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.24" level="project" />
50
- <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.24" level="project" />
51
- <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.7.RELEASE" level="project" />
52
- <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.41" level="project" />
53
- <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
54
- <orderEntry type="library" name="Maven: id.co.qhodok.tools:trigger:2.0" level="project" />
55
- <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
56
- <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
57
- <orderEntry type="library" name="Maven: org.zeromq:jeromq:0.4.2" level="project" />
58
- <orderEntry type="library" name="Maven: org.zeromq:jnacl:0.1.0" level="project" />
59
- </component>
60
-</module>
payment_gateway_tools/src/main/java/id/co/accessmobile/adzanreminder/hutch/tools/Tools.java
....@@ -1,12 +1,5 @@
11 package id.co.accessmobile.adzanreminder.hutch.tools;
22
3
-import ch.qos.logback.classic.Logger;
4
-import ch.qos.logback.classic.LoggerContext;
5
-import ch.qos.logback.classic.encoder.PatternLayoutEncoder;
6
-import ch.qos.logback.core.rolling.FixedWindowRollingPolicy;
7
-import ch.qos.logback.core.rolling.RollingFileAppender;
8
-import ch.qos.logback.core.rolling.TimeBasedRollingPolicy;
9
-import org.slf4j.LoggerFactory;
103
114 import java.io.*;
125 import java.net.HttpURLConnection;
....@@ -20,38 +13,38 @@
2013 * [email protected]
2114 */
2215 public class Tools {
23
- public static Logger createLogger(Class nameClass, String fileappender, String pattern) {
24
- LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
25
- RollingFileAppender fileAppender = new RollingFileAppender();
26
- fileAppender.setContext(loggerContext);
27
- fileAppender.setFile(fileappender + "log_message.log_message");
28
-
29
- FixedWindowRollingPolicy rollingPolicy = new FixedWindowRollingPolicy();
30
- rollingPolicy.setContext(loggerContext);
31
- rollingPolicy.setParent(fileAppender);
32
- rollingPolicy.setFileNamePattern(fileappender + "log_message%i.log_message");
33
- rollingPolicy.start();
34
-
35
- PatternLayoutEncoder encoder = new PatternLayoutEncoder();
36
- encoder.setContext(loggerContext);
37
- encoder.setPattern(pattern);
38
- encoder.start();
39
-
40
- TimeBasedRollingPolicy timeBasedRollingPolicy = new TimeBasedRollingPolicy();
41
- timeBasedRollingPolicy.setContext(loggerContext);
42
- timeBasedRollingPolicy.setFileNamePattern(fileappender + "log_message-%d{yyyy-MM-dd}.log_message");
43
- timeBasedRollingPolicy.setMaxHistory(365);
44
- timeBasedRollingPolicy.setParent(fileAppender);
45
- timeBasedRollingPolicy.start();
46
-
47
- fileAppender.setEncoder(encoder);
48
- fileAppender.setRollingPolicy(rollingPolicy);
49
- fileAppender.setTriggeringPolicy(timeBasedRollingPolicy);
50
- fileAppender.start();
51
- Logger logger = loggerContext.getLogger(nameClass);
52
- logger.addAppender(fileAppender);
53
- return logger;
54
- }
16
+// public static Logger createLogger(Class nameClass, String fileappender, String pattern) {
17
+// LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
18
+// RollingFileAppender fileAppender = new RollingFileAppender();
19
+// fileAppender.setContext(loggerContext);
20
+// fileAppender.setFile(fileappender + "log_message.log_message");
21
+//
22
+// FixedWindowRollingPolicy rollingPolicy = new FixedWindowRollingPolicy();
23
+// rollingPolicy.setContext(loggerContext);
24
+// rollingPolicy.setParent(fileAppender);
25
+// rollingPolicy.setFileNamePattern(fileappender + "log_message%i.log_message");
26
+// rollingPolicy.start();
27
+//
28
+// PatternLayoutEncoder encoder = new PatternLayoutEncoder();
29
+// encoder.setContext(loggerContext);
30
+// encoder.setPattern(pattern);
31
+// encoder.start();
32
+//
33
+// TimeBasedRollingPolicy timeBasedRollingPolicy = new TimeBasedRollingPolicy();
34
+// timeBasedRollingPolicy.setContext(loggerContext);
35
+// timeBasedRollingPolicy.setFileNamePattern(fileappender + "log_message-%d{yyyy-MM-dd}.log_message");
36
+// timeBasedRollingPolicy.setMaxHistory(365);
37
+// timeBasedRollingPolicy.setParent(fileAppender);
38
+// timeBasedRollingPolicy.start();
39
+//
40
+// fileAppender.setEncoder(encoder);
41
+// fileAppender.setRollingPolicy(rollingPolicy);
42
+// fileAppender.setTriggeringPolicy(timeBasedRollingPolicy);
43
+// fileAppender.start();
44
+// Logger logger = loggerContext.getLogger(nameClass);
45
+// logger.addAppender(fileAppender);
46
+// return logger;
47
+// }
5548 public static String consuming(String address, String message) throws IOException {
5649 String responseString = "";
5750 String outputString = "";
payment_gateway_trigger_service/payment-gateway-trigger-service.iml
deleted file mode 100644
....@@ -1,62 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
4
- <output url="file://$MODULE_DIR$/target/classes" />
5
- <output-test url="file://$MODULE_DIR$/target/test-classes" />
6
- <content url="file://$MODULE_DIR$">
7
- <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
- <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9
- <excludeFolder url="file://$MODULE_DIR$/target" />
10
- </content>
11
- <orderEntry type="inheritedJdk" />
12
- <orderEntry type="sourceFolder" forTests="false" />
13
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-devtools:1.5.2.RELEASE" level="project" />
14
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
15
- <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
16
- <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.7.RELEASE" level="project" />
17
- <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
18
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.2.RELEASE" level="project" />
19
- <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
20
- <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.0" level="project" />
21
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:1.5.2.RELEASE" level="project" />
22
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.2.RELEASE" level="project" />
23
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.2.RELEASE" level="project" />
24
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
25
- <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
26
- <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.24" level="project" />
27
- <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.24" level="project" />
28
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
29
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:1.5.2.RELEASE" level="project" />
30
- <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
31
- <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
32
- <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.2.RELEASE" level="project" />
33
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.11" level="project" />
34
- <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.11" level="project" />
35
- <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.7.RELEASE" level="project" />
36
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.0.12.Final" level="project" />
37
- <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
38
- <orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final" level="project" />
39
- <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
40
- <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
41
- <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.0.Final" level="project" />
42
- <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
43
- <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.1.Final" level="project" />
44
- <orderEntry type="library" name="Maven: org.hibernate:hibernate-entitymanager:5.0.12.Final" level="project" />
45
- <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.2" level="project" />
46
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:1.11.1.RELEASE" level="project" />
47
- <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.1.RELEASE" level="project" />
48
- <orderEntry type="library" name="Maven: org.springframework:spring-orm:4.3.7.RELEASE" level="project" />
49
- <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.7.RELEASE" level="project" />
50
- <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.7.RELEASE" level="project" />
51
- <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.24" level="project" />
52
- <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.24" level="project" />
53
- <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.7.RELEASE" level="project" />
54
- <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.41" level="project" />
55
- <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
56
- <orderEntry type="library" name="Maven: id.co.qhodok.tools:trigger:2.0" level="project" />
57
- <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
58
- <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
59
- <orderEntry type="library" name="Maven: org.zeromq:jeromq:0.4.2" level="project" />
60
- <orderEntry type="library" name="Maven: org.zeromq:jnacl:0.1.0" level="project" />
61
- </component>
62
-</module>
payment_gateway_trigger_service/pom.xml
....@@ -14,7 +14,7 @@
1414 <dependencies>
1515 <dependency>
1616 <groupId>org.springframework.boot</groupId>
17
- <artifactId>spring-boot-devtools</artifactId>
17
+ <artifactId>spring-boot-starter</artifactId>
1818 </dependency>
1919 </dependencies>
2020
pom.xml
....@@ -34,16 +34,7 @@
3434 <dependency>
3535 <groupId>com.fasterxml.jackson.core</groupId>
3636 <artifactId>jackson-core</artifactId>
37
- <version>2.9.0</version>
38
- </dependency>
39
- <!-- database -->
40
- <dependency>
41
- <groupId>org.springframework.boot</groupId>
42
- <artifactId>spring-boot-starter-data-jpa</artifactId>
43
- </dependency>
44
- <dependency>
45
- <groupId>mysql</groupId>
46
- <artifactId>mysql-connector-java</artifactId>
37
+ <version>2.9.4</version>
4738 </dependency>
4839 <!-- https://mvnrepository.com/artifact/org.json/json -->
4940 <dependency>
....@@ -53,12 +44,18 @@
5344 </dependency>
5445 <dependency>
5546 <groupId>id.co.qhodok.tools</groupId>
56
- <artifactId>trigger</artifactId>
57
- <version>2.0</version>
47
+ <artifactId>qhodok-tools-logger</artifactId>
48
+ <version>1.0</version>
49
+ </dependency>
50
+ <dependency>
51
+ <groupId>id.co.qhodok.tools</groupId>
52
+ <artifactId>qhodok-tools-trigger</artifactId>
53
+ <version>1.0</version>
5854 </dependency>
5955 </dependencies>
6056
6157 <properties>
6258 <java.version>1.8</java.version>
6359 </properties>
60
+
6461 </project>