cordova-plugin-netcontroll-integration 1.0.93 → 1.0.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/plugin.xml +1 -31
- package/src/android/Cielo/CieloLioLocal.java +0 -22
- package/src/android/NetControllCordovaPluginsIntegration.java +0 -55
- package/src/android/Safra/SafraPayIngenico.java +0 -2
- package/src/android/Utils/NetControllPrinter.java +0 -5
- package/src/build.gradle +0 -16
- package/www/Rede/RedeGpos700.js +12 -12
- package/src/android/PagSeguro/PagSeguroPax.java +0 -644
- package/src/android/Stone/StoneSumni.java +0 -1343
- package/www/PagSeguro/PagSeguroPax.js +0 -21
- package/www/Stone/Sumni.js +0 -81
- package/www/alice.js +0 -4
- package/www/bob.js +0 -10
package/README.md
CHANGED
package/package.json
CHANGED
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="cordova-plugin-netcontroll-integration" version="1.0.
|
|
2
|
+
<plugin id="cordova-plugin-netcontroll-integration" version="1.0.98"
|
|
3
3
|
xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
|
4
4
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
|
5
5
|
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
</js-module>
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
<js-module name="ElginM10Terminal" src="www/Elgin/M10Terminal.js">
|
|
19
18
|
<clobbers target="cordova.plugins.NetControllCordovaPluginsIntegration.ElginM10Terminal" />
|
|
20
19
|
</js-module>
|
|
@@ -22,12 +21,6 @@
|
|
|
22
21
|
<clobbers target="cordova.plugins.NetControllCordovaPluginsIntegration.ElginSmartPay" />
|
|
23
22
|
</js-module>
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<js-module name="StoneSumni" src="www/Stone/Sumni.js">
|
|
28
|
-
<clobbers target="cordova.plugins.NetControllCordovaPluginsIntegration.StoneSumni" />
|
|
29
|
-
</js-module>
|
|
30
|
-
|
|
31
24
|
<js-module name="RedeGPos700" src="www/Rede/RedeGpos700.js">
|
|
32
25
|
<clobbers target="cordova.plugins.NetControllCordovaPluginsIntegration.RedeGPos700" />
|
|
33
26
|
</js-module>
|
|
@@ -36,22 +29,6 @@
|
|
|
36
29
|
<clobbers target="cordova.plugins.NetControllCordovaPluginsIntegration.SafraPayIngenico" />
|
|
37
30
|
</js-module>
|
|
38
31
|
|
|
39
|
-
<js-module name="PagSeguroPax" src="www/PagSeguro/PagSeguroPax.js">
|
|
40
|
-
<clobbers target="cordova.plugins.NetControllCordovaPluginsIntegration.PagSeguroPax" />
|
|
41
|
-
</js-module>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
<js-module src="www/alice.js" name="alice">
|
|
46
|
-
<clobbers target="cordova.plugins.NetControllCordovaPluginsIntegration.alice" />
|
|
47
|
-
<!-- <runs/> -->
|
|
48
|
-
</js-module>
|
|
49
|
-
<js-module src="www/bob.js" name="bob">
|
|
50
|
-
<clobbers target="cordova.plugins.NetControllCordovaPluginsIntegration.bob" />
|
|
51
|
-
<!-- <runs/> -->
|
|
52
|
-
</js-module>
|
|
53
|
-
|
|
54
|
-
|
|
55
32
|
<dependency id="cordova-plugin-androidx-adapter" version="1.1.3" />
|
|
56
33
|
<platform name="android">
|
|
57
34
|
<config-file parent="/*" target="res/xml/config.xml">
|
|
@@ -89,9 +66,6 @@
|
|
|
89
66
|
<resource-file src="src/libs/InterfaceAutomacao-v2.0.0.9.aar" target="libs/InterfaceAutomacao-v2.0.0.9.aar" />
|
|
90
67
|
|
|
91
68
|
|
|
92
|
-
<!--______________________________Stone______________________________-->
|
|
93
|
-
<source-file src="src/android/Stone/StoneSumni.java" target-dir="src/cordova-plugin-netcontroll-integration/Stone" />
|
|
94
|
-
|
|
95
69
|
<!--_____________________________UseRede_____________________________-->
|
|
96
70
|
<source-file src="src/android/Rede/RedeGPos700.java" target-dir="src/cordova-plugin-netcontroll-integration/UseRede" />
|
|
97
71
|
|
|
@@ -110,10 +84,6 @@
|
|
|
110
84
|
|
|
111
85
|
<resource-file src="src/libs/IntegracaoSafra-v2.0.aar" target="libs/IntegracaoSafra-v2.0.aar" />
|
|
112
86
|
|
|
113
|
-
<!--______________________________PagSeguro___________________________-->
|
|
114
|
-
<source-file src="src/android/PagSeguro/PagSeguroPax.java" target-dir="src/cordova-plugin-netcontroll-integration/PagSeguro" />
|
|
115
|
-
|
|
116
|
-
|
|
117
87
|
<!--______________________________Other______________________________-->
|
|
118
88
|
|
|
119
89
|
<!-- BarcodeScanner -->
|
|
@@ -845,28 +845,6 @@ public class CieloLioLocal {
|
|
|
845
845
|
0,
|
|
846
846
|
callbackContext);
|
|
847
847
|
callbackContext.success("ImpressoOk");
|
|
848
|
-
// // PosPrintProvider customPosPrintProvider = new PosPrintProvider(mContext);
|
|
849
|
-
// // // PosPrintProvider posPrintReceiptProvider = new PosPrintProvider(mContext, transactionObject, receiptType);
|
|
850
|
-
// // customPosPrintProvider.addBitmap(bitmap);
|
|
851
|
-
// ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
|
852
|
-
// bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
|
|
853
|
-
// byte[] byteArray = byteArrayOutputStream.toByteArray();
|
|
854
|
-
// String encoded = Base64.encodeToString(byteArray, Base64.DEFAULT);
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
// customPosPrintProvider.setConnectionCallback(new StoneCallbackInterface() {
|
|
859
|
-
// @Override
|
|
860
|
-
// public void onSuccess() {
|
|
861
|
-
// callbackContext.success("ImpressoOk");
|
|
862
|
-
// }
|
|
863
|
-
|
|
864
|
-
// @Override
|
|
865
|
-
// public void onError() {
|
|
866
|
-
// callbackContext.error("Erro ao imprimir: " + customPosPrintProvider.getListOfErrors());
|
|
867
|
-
// }
|
|
868
|
-
// });
|
|
869
|
-
// customPosPrintProvider.execute();
|
|
870
848
|
} catch (Exception errorPost) {
|
|
871
849
|
callbackContext.error("Result - ConverterHtmlToBitmap: " + "Error Detail: " + errorPost);
|
|
872
850
|
}
|
|
@@ -19,18 +19,12 @@ public class NetControllCordovaPluginsIntegration extends CordovaPlugin {
|
|
|
19
19
|
//Cielo
|
|
20
20
|
public CieloLioLocal cieloLioLocal;
|
|
21
21
|
|
|
22
|
-
//Stone
|
|
23
|
-
public StoneSumni stoneSumni;
|
|
24
|
-
|
|
25
22
|
//Rede
|
|
26
23
|
public RedeGPos700 redeGPos700;
|
|
27
24
|
|
|
28
25
|
//SafraPay
|
|
29
26
|
public SafraPayIngenico safraPayIngenico;
|
|
30
27
|
|
|
31
|
-
//PagSeguro
|
|
32
|
-
public PagSeguroPax pagSeguroPax;
|
|
33
|
-
|
|
34
28
|
//Cordova/Java Params
|
|
35
29
|
private Activity mActivity;
|
|
36
30
|
private Context mContext;
|
|
@@ -68,13 +62,6 @@ public class NetControllCordovaPluginsIntegration extends CordovaPlugin {
|
|
|
68
62
|
}
|
|
69
63
|
}
|
|
70
64
|
|
|
71
|
-
private void initializeStoneSumni() {
|
|
72
|
-
if (this.stoneSumni == null) {
|
|
73
|
-
this.stoneSumni = new StoneSumni();
|
|
74
|
-
this.stoneSumni.initialize(this.cordova, this.webView);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
65
|
private void initializeRedeGpos700() {
|
|
79
66
|
if (this.redeGPos700 == null) {
|
|
80
67
|
this.redeGPos700 = new RedeGPos700();
|
|
@@ -89,13 +76,6 @@ public class NetControllCordovaPluginsIntegration extends CordovaPlugin {
|
|
|
89
76
|
}
|
|
90
77
|
}
|
|
91
78
|
|
|
92
|
-
private void initializePagSeguroPax() {
|
|
93
|
-
if (this.pagSeguroPax == null) {
|
|
94
|
-
this.pagSeguroPax = new PagSeguroPax();
|
|
95
|
-
this.pagSeguroPax.initialize(this.cordova, this.webView);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
79
|
@Override
|
|
100
80
|
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
|
|
101
81
|
try {
|
|
@@ -103,19 +83,6 @@ public class NetControllCordovaPluginsIntegration extends CordovaPlugin {
|
|
|
103
83
|
String[] actionProviderList = action.split("\\.");
|
|
104
84
|
String provider = actionProviderList[0];
|
|
105
85
|
|
|
106
|
-
// if (action.equals("GerarImagemImpresso")) {
|
|
107
|
-
// JSONObject params = args.getJSONObject(0);
|
|
108
|
-
// String htmlString = params.getString("dados");
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
// //String html = "<html><body><p>Hello world!</p><br/>Html bitmap</body><html>";
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
// //callbackContext.success("Result GerarImagemImpresso");
|
|
115
|
-
// return true;
|
|
116
|
-
// }
|
|
117
|
-
|
|
118
|
-
|
|
119
86
|
switch (provider.toLowerCase()) {
|
|
120
87
|
case "elgin":
|
|
121
88
|
String elginProduct = actionProviderList[1];
|
|
@@ -144,17 +111,6 @@ public class NetControllCordovaPluginsIntegration extends CordovaPlugin {
|
|
|
144
111
|
default:
|
|
145
112
|
break;
|
|
146
113
|
}
|
|
147
|
-
case "stone":
|
|
148
|
-
String stoneProduct = actionProviderList[1];
|
|
149
|
-
switch (stoneProduct.toLowerCase()) {
|
|
150
|
-
case "sumni":
|
|
151
|
-
this.initializeStoneSumni();
|
|
152
|
-
String stoneSuminAction = actionProviderList[2];
|
|
153
|
-
boolean resultStoneSuminExecute = this.stoneSumni.execute(stoneSuminAction, args, callbackContext);
|
|
154
|
-
return resultStoneSuminExecute;
|
|
155
|
-
default:
|
|
156
|
-
break;
|
|
157
|
-
}
|
|
158
114
|
case "rede":
|
|
159
115
|
String redeProduct = actionProviderList[1];
|
|
160
116
|
switch (redeProduct.toLowerCase()) {
|
|
@@ -177,17 +133,6 @@ public class NetControllCordovaPluginsIntegration extends CordovaPlugin {
|
|
|
177
133
|
default:
|
|
178
134
|
break;
|
|
179
135
|
}
|
|
180
|
-
case "pagseguro":
|
|
181
|
-
String pagSeguroProduct = actionProviderList[1];
|
|
182
|
-
switch (pagSeguroProduct.toLowerCase()) {
|
|
183
|
-
case "pagseguropax":
|
|
184
|
-
this.initializePagSeguroPax();
|
|
185
|
-
String pagSeguroAction = actionProviderList[2];
|
|
186
|
-
boolean resultPagSeguroExecute = this.pagSeguroPax.execute(pagSeguroAction, args, callbackContext);
|
|
187
|
-
return resultPagSeguroExecute;
|
|
188
|
-
default:
|
|
189
|
-
break;
|
|
190
|
-
}
|
|
191
136
|
default:
|
|
192
137
|
break;
|
|
193
138
|
}
|
|
@@ -53,8 +53,6 @@ import br.com.setis.safra.integracaosafra.util.ReturnCodes;
|
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
//Json Serialize
|
|
56
|
-
import stone.application.enums.ReceiptType;
|
|
57
|
-
|
|
58
56
|
import com.google.gson.Gson;
|
|
59
57
|
import com.google.gson.GsonBuilder;
|
|
60
58
|
import com.google.gson.annotations.SerializedName;
|
|
@@ -8,11 +8,6 @@ import android.content.Context;
|
|
|
8
8
|
import android.os.Environment;
|
|
9
9
|
import android.util.Base64;
|
|
10
10
|
|
|
11
|
-
import br.com.uol.pagseguro.plugpagservice.wrapper.PlugPagPrintResult;
|
|
12
|
-
import br.com.uol.pagseguro.plugpagservice.wrapper.PlugPagPrinterData;
|
|
13
|
-
import br.com.uol.pagseguro.plugpagservice.wrapper.PlugPagPrinterListener;
|
|
14
|
-
import stone.application.enums.ReceiptType;
|
|
15
|
-
|
|
16
11
|
import com.google.gson.Gson;
|
|
17
12
|
import com.google.gson.GsonBuilder;
|
|
18
13
|
import com.google.gson.annotations.SerializedName;
|
package/src/build.gradle
CHANGED
|
@@ -5,10 +5,6 @@ repositories {
|
|
|
5
5
|
dirs 'src/main/libs'
|
|
6
6
|
}
|
|
7
7
|
mavenCentral()
|
|
8
|
-
maven { url "https://packagecloud.io/priv/a753b90c3483978bb2514e3618ee3f72eb37ec2c9aa0b31d/stone/pos-android/maven2" }
|
|
9
|
-
maven { url "https://packagecloud.io/priv/a753b90c3483978bb2514e3618ee3f72eb37ec2c9aa0b31d/stone/pos-android-internal/maven2" }
|
|
10
|
-
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
|
11
|
-
maven { url 'https://github.com/pagseguro/PlugPagServiceWrapper/raw/master' }
|
|
12
8
|
}
|
|
13
9
|
dependencies {
|
|
14
10
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
@@ -44,14 +40,6 @@ dependencies {
|
|
|
44
40
|
// }
|
|
45
41
|
|
|
46
42
|
|
|
47
|
-
//______________________________ Stone ______________________________
|
|
48
|
-
implementation "br.com.stone:stone-sdk:4.0.6"
|
|
49
|
-
implementation "br.com.stone:stone-sdk-posandroid:4.0.6"
|
|
50
|
-
// // implementation "br.com.stone:stone-sdk-posandroid-ingenico:4.0.6"
|
|
51
|
-
// // implementation "br.com.stone:stone-sdk-posandroid-gertec:4.0.6"
|
|
52
|
-
implementation "br.com.stone:stone-sdk-posandroid-sunmi:4.0.6"
|
|
53
|
-
|
|
54
|
-
|
|
55
43
|
//______________________________ UseRede ______________________________
|
|
56
44
|
implementation(name: 'sdk_3.0_release', ext: 'aar')
|
|
57
45
|
implementation(name: 'payment-1.14.10.181016', ext: 'aar')
|
|
@@ -61,10 +49,6 @@ dependencies {
|
|
|
61
49
|
|
|
62
50
|
implementation(name:'IntegracaoSafra-v2.0', ext:'aar')
|
|
63
51
|
|
|
64
|
-
//______________________________ PagSeguro ______________________________
|
|
65
|
-
implementation 'br.com.uol.pagseguro.plugpagservice.wrapper:wrapper:1.7.6'
|
|
66
|
-
|
|
67
|
-
|
|
68
52
|
//Biblioteca de suporte dos códigos de barras utilizada para impressão dos mesmos
|
|
69
53
|
implementation 'com.google.zxing:core:3.3.2'
|
|
70
54
|
//implementation 'com.google.zxing:javase:3.3.2'
|
package/www/Rede/RedeGpos700.js
CHANGED
|
@@ -8,44 +8,44 @@ exports.Testar = function (params, success, error) {
|
|
|
8
8
|
|
|
9
9
|
exports.InicializaImpressao = function (params, success, error) {
|
|
10
10
|
debugger;
|
|
11
|
-
exec(success, error, 'NetControllCordovaPluginsIntegration', '
|
|
11
|
+
exec(success, error, 'NetControllCordovaPluginsIntegration', 'Rede.Gpos700.InicializaImpressao', [params]);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
exports.AvancaPapel = function (params, success, error) {
|
|
15
|
-
exec(success, error, 'NetControllCordovaPluginsIntegration', '
|
|
15
|
+
exec(success, error, 'NetControllCordovaPluginsIntegration', 'Rede.Gpos700.AvancaPapel', [params]);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
exports.ImpressaoTexto = function (params, success, error) {
|
|
19
|
-
exec(success, error, 'NetControllCordovaPluginsIntegration', '
|
|
19
|
+
exec(success, error, 'NetControllCordovaPluginsIntegration', 'Rede.Gpos700.ImpressaoTexto', [params]);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
exports.ImpressaoCodigoBarras = function (params, success, error) {
|
|
23
|
-
exec(success, error, 'NetControllCordovaPluginsIntegration', '
|
|
23
|
+
exec(success, error, 'NetControllCordovaPluginsIntegration', 'Rede.Gpos700.ImpressaoCodigoBarras', [params]);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
exports.ImpressaoQRCode = function (params, success, error) {
|
|
27
|
-
exec(success, error, 'NetControllCordovaPluginsIntegration', '
|
|
27
|
+
exec(success, error, 'NetControllCordovaPluginsIntegration', 'Rede.Gpos700.ImpressaoQRCode', [params]);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
exports.StatusImpressora = function (params, success, error) {
|
|
31
|
-
exec(success, error, 'NetControllCordovaPluginsIntegration', '
|
|
31
|
+
exec(success, error, 'NetControllCordovaPluginsIntegration', 'Rede.Gpos700.StatusImpressora', [params]);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
exports.ImprimeImagemBase64 = function (params, success, error) {
|
|
35
|
-
exec(success, error, 'NetControllCordovaPluginsIntegration', '
|
|
35
|
+
exec(success, error, 'NetControllCordovaPluginsIntegration', 'Rede.Gpos700.ImprimeImagemBase64', [params]);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
exports.IniciarPagamento = function (params, success, error) {
|
|
40
|
-
exec(success, error, 'NetControllCordovaPluginsIntegration', '
|
|
40
|
+
exec(success, error, 'NetControllCordovaPluginsIntegration', 'Rede.Gpos700.IniciarPagamento', [params]);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
exports.EstornarPagamento = function (params, success, error) {
|
|
44
|
-
exec(success, error, 'NetControllCordovaPluginsIntegration', '
|
|
44
|
+
exec(success, error, 'NetControllCordovaPluginsIntegration', 'Rede.Gpos700.EstornarPagamento', [params]);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
exports.ReimprimirPagamento = function (params, success, error) {
|
|
48
|
-
exec(success, error, 'NetControllCordovaPluginsIntegration', '
|
|
48
|
+
exec(success, error, 'NetControllCordovaPluginsIntegration', 'Rede.Gpos700.ReimprimirPagamento', [params]);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
|
|
@@ -58,12 +58,12 @@ exports.ReimprimirPagamento = function (params, success, error) {
|
|
|
58
58
|
|
|
59
59
|
exports.ImprimirTodasFuncoes = function (params, success, error) {
|
|
60
60
|
debugger;
|
|
61
|
-
exec(success, error, 'NetControllCordovaPluginsIntegration', '
|
|
61
|
+
exec(success, error, 'NetControllCordovaPluginsIntegration', 'Rede.Gpos700.ImprimirTodasFuncoes', [params]);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
exports.ImpressaoTextoNetPrintImg = function (params, success, error) {
|
|
66
|
-
exec(success, error, 'NetControllCordovaPluginsIntegration', '
|
|
66
|
+
exec(success, error, 'NetControllCordovaPluginsIntegration', 'Rede.Gpos700.ImpressaoTextoNetPrintImg', [params]);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
|