ng-easycommerce 0.0.494 → 0.0.495

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 CHANGED
@@ -1,3 +1,5 @@
1
+ # version 0.0.495
2
+ - Se completa el circuito del método de pago de bamboo. Se continua trabajando en la parametrización.
1
3
  # version 0.0.494
2
4
  - Se agrega control para habilitar/deshabilitar la conversion de la moneda. Se agrega la carga de la moneda por defecto en caso de que este deshabilitado.
3
5
  # version 0.0.493
@@ -17,6 +17,8 @@
17
17
  <script src="https://api.stage.bamboopayment.com/v1/Scripts/PWCheckout.js?key=Rohrq0RNz3sc0Ojn5BKxuW_I56ONV7HQ"
18
18
  type="text/javascript"></script>
19
19
 
20
+
21
+
20
22
  </head>
21
23
 
22
24
  <body>
@@ -27,16 +29,16 @@
27
29
  </body>
28
30
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
29
31
  <script type="text/javascript">
30
- $(document).ready(function() {
32
+ $(document).ready(function () {
31
33
  let pwCheckoutProperties = JSON.parse(localStorage.getItem('pwCheckouProperties'))
32
34
 
33
35
  const dataRedirect = localStorage.getItem('dataRedirect')
34
36
 
35
37
  PWCheckout.SetProperties(
36
38
  {
37
- "name": pwCheckoutProperties.name,
38
- "email": "test@test.com",
39
- "button_label": pwCheckoutProperties.button_label,
39
+ "name": pwCheckoutProperties.name,
40
+ "email": "test@test.com",
41
+ "button_label": pwCheckoutProperties.button_label,
40
42
  "description": "",
41
43
  "currency": pwCheckoutProperties.currency,
42
44
  "amount": "1",
@@ -51,8 +53,8 @@
51
53
 
52
54
  function onTokenCreated(token) {
53
55
  //console.log(JSON.stringify(token));
54
- localStorage.setItem('data',JSON.stringify(token))
55
-
56
+ localStorage.setItem('data', JSON.stringify(token))
57
+
56
58
  let data = {
57
59
  tokenID: token.TokenId,
58
60
  orderToken: pwCheckoutProperties.orderToken
@@ -60,38 +62,38 @@
60
62
 
61
63
 
62
64
  try {
63
- fetch(dataRedirect, {
64
- method: 'POST',
65
- body: JSON.stringify(data),
66
- headers: {
67
- 'Content-Type': 'application/json'
68
- }
69
- }).then(res => {
70
- res.json()
71
- console.log(res)
72
- //localStorage.setItem('state', 'success')
73
- }).catch(error => {
74
- console.error('Error:', error)
75
- //processError(response)
76
- //localStorage.setItem('state', 'failure')
77
- })
78
- .then(response => {
79
- console.log('Success:', response)
80
- //localStorage.setItem('state', 'success')
81
- /* setMessageInStore(response)
82
- if (response.hasOwnProperty('status')) {
83
- if (response.status == 'approved' || response.status == 'partially_authorized') {
84
- processResponse(response)
85
- } else {
86
- processError(response)
87
- }
65
+ fetch(dataRedirect, {
66
+ method: 'POST',
67
+ body: JSON.stringify(data),
68
+ headers: {
69
+ 'Content-Type': 'application/json'
70
+ }
71
+ }).then(res => {
72
+ res.json()
73
+ console.log(res)
74
+ //localStorage.setItem('state', 'success')
75
+ }).catch(error => {
76
+ console.error('Error:', error)
77
+ //processError(response)
78
+ localStorage.setItem('state', 'failure')
79
+ })
80
+ .then(response => {
81
+ console.log('Success:', response)
82
+ localStorage.setItem('state', 'success')
83
+ /* setMessageInStore(response)
84
+ if (response.hasOwnProperty('status')) {
85
+ if (response.status == 'approved' || response.status == 'partially_authorized') {
86
+ processResponse(response)
88
87
  } else {
89
88
  processError(response)
90
- } */
91
- });
92
- } catch (error) {
93
- //processError(response)
94
- }
89
+ }
90
+ } else {
91
+ processError(response)
92
+ } */
93
+ });
94
+ } catch (error) {
95
+ //processError(response)
96
+ }
95
97
  }
96
98
 
97
99
  function OpenIframe() {
@@ -17029,7 +17029,7 @@
17029
17029
  if (state == 'success') {
17030
17030
  (_a = _this.ventana) === null || _a === void 0 ? void 0 : _a.close();
17031
17031
  console.log(JSON.parse(localStorage.getItem('data')));
17032
- //this.ready.emit(true)
17032
+ _this.ready.emit(true);
17033
17033
  var data = JSON.parse(localStorage.getItem('data'));
17034
17034
  /* this.connection.post(this.processPaymentApi(),{
17035
17035
  tokenID: data.TokenId,