cloudcommerce 0.0.113 → 0.0.115
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/CHANGELOG.md +16 -0
- package/ecomplus-stores/monocard/functions/core/package.json +1 -1
- package/ecomplus-stores/monocard/functions/events/package.json +2 -2
- package/ecomplus-stores/monocard/functions/modules/package.json +2 -2
- package/ecomplus-stores/monocard/functions/passport/package.json +2 -2
- package/ecomplus-stores/monocard/functions/ssr/package.json +5 -4
- package/ecomplus-stores/monocard/functions/ssr/src/components/TheHeader.vue +5 -0
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Pages.astro +24 -0
- package/ecomplus-stores/monocard/functions/ssr/src/pages/[...slug].astro +1 -3
- package/ecomplus-stores/monocard/functions/ssr/src/pages/fallback.astro +1 -3
- package/ecomplus-stores/monocard/package.json +1 -1
- package/package.json +7 -7
- package/packages/api/package.json +1 -1
- package/packages/apps/correios/package.json +2 -2
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/frenet/package.json +2 -2
- package/packages/apps/mercadopago/package.json +5 -5
- package/packages/apps/tiny-erp/package.json +4 -4
- package/packages/cli/package.json +2 -2
- package/packages/config/package.json +1 -1
- package/packages/events/package.json +3 -3
- package/packages/firebase/package.json +3 -3
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +4 -4
- package/packages/passport/package.json +3 -3
- package/packages/ssr/package.json +5 -5
- package/packages/storefront/astro.config.mjs +17 -1
- package/packages/storefront/dist/{client/assets/_...129504ca.css → server/assets/_...slug_.648f7d81.css} +1 -1
- package/packages/storefront/package.json +11 -11
- package/packages/storefront/src/components/.gitkeep +0 -0
- package/packages/storefront/src/layouts/Pages.astro +38 -0
- package/packages/storefront/src/{assets → lib/assets}/pico.css +0 -0
- package/packages/storefront/src/lib/components/ADrawer.vue +1 -1
- package/packages/storefront/src/lib/components/LoginDrawer.vue +2 -2
- package/packages/storefront/src/lib/components/LoginForm.vue +2 -2
- package/packages/storefront/src/lib/components/TopBar.vue +2 -2
- package/packages/storefront/src/lib/layouts/Base.astro +2 -2
- package/packages/storefront/src/lib/layouts/BaseBody.astro +2 -22
- package/packages/storefront/src/lib/layouts/BaseHead.astro +2 -2
- package/packages/storefront/src/lib/layouts/BaseStateJson.astro +1 -1
- package/packages/storefront/src/lib/layouts/Pages.astro +1 -1
- package/packages/storefront/src/lib/layouts/PagesHeader.astro +20 -18
- package/packages/storefront/src/lib/main/Fallback.astro +1 -1
- package/packages/storefront/src/lib/main/Home.astro +1 -1
- package/packages/storefront/src/lib/main/Wildcard.astro +1 -1
- package/packages/storefront/src/lib/ssr-context.ts +1 -1
- package/packages/storefront/src/lib/state/customer-session.ts +1 -1
- package/packages/storefront/src/lib/types/cms-code.d.ts +5 -0
- package/packages/storefront/src/lib/types/cms-contacts.d.ts +5 -0
- package/packages/storefront/src/lib/types/cms-header.d.ts +5 -0
- package/packages/storefront/src/lib/types/cms-settings.d.ts +5 -0
- package/packages/storefront/src/lib/types/cms-social.d.ts +5 -0
- package/packages/storefront/src/pages/[...slug].astro +3 -5
- package/packages/storefront/src/pages/fallback.astro +3 -5
- package/packages/storefront/src/pages/index.astro +3 -5
- package/packages/storefront/tsconfig.json +3 -1
- package/packages/storefront/uno.config.ts +8 -0
- package/packages/types/package.json +1 -1
- package/packages/apps/mercadopago/lib/index.d.ts +0 -1
- package/packages/apps/mercadopago/lib/index.js +0 -3
- package/packages/apps/mercadopago/lib/index.js.map +0 -1
- package/packages/apps/mercadopago/lib/mercadopago.d.ts +0 -86
- package/packages/apps/mercadopago/lib/mercadopago.js +0 -15
- package/packages/apps/mercadopago/lib/mercadopago.js.map +0 -1
- package/packages/apps/mercadopago/lib/mp-create-transaction.d.ts +0 -85
- package/packages/apps/mercadopago/lib/mp-create-transaction.js +0 -270
- package/packages/apps/mercadopago/lib/mp-create-transaction.js.map +0 -1
- package/packages/apps/mercadopago/lib/mp-list-payments.d.ts +0 -7
- package/packages/apps/mercadopago/lib/mp-list-payments.js +0 -175
- package/packages/apps/mercadopago/lib/mp-list-payments.js.map +0 -1
- package/packages/apps/mercadopago/lib/mp-webhook.d.ts +0 -5
- package/packages/apps/mercadopago/lib/mp-webhook.js +0 -119
- package/packages/apps/mercadopago/lib/mp-webhook.js.map +0 -1
- package/packages/apps/tiny-erp/lib/event-to-tiny.js +0 -115
- package/packages/apps/tiny-erp/lib/event-to-tiny.js.map +0 -1
- package/packages/apps/tiny-erp/lib/index.js +0 -2
- package/packages/apps/tiny-erp/lib/index.js.map +0 -1
- package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js +0 -79
- package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js.map +0 -1
- package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +0 -84
- package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +0 -1
- package/packages/apps/tiny-erp/lib/integration/export-product-to-tiny.js +0 -58
- package/packages/apps/tiny-erp/lib/integration/export-product-to-tiny.js.map +0 -1
- package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js +0 -7
- package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js.map +0 -1
- package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +0 -92
- package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js.map +0 -1
- package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js +0 -158
- package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +0 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js +0 -46
- package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js.map +0 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js +0 -193
- package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js.map +0 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js +0 -199
- package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +0 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js +0 -129
- package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js.map +0 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/status-from-tiny.js +0 -34
- package/packages/apps/tiny-erp/lib/integration/parsers/status-from-tiny.js.map +0 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/status-to-tiny.js +0 -39
- package/packages/apps/tiny-erp/lib/integration/parsers/status-to-tiny.js.map +0 -1
- package/packages/apps/tiny-erp/lib/integration/post-tiny-erp.js +0 -47
- package/packages/apps/tiny-erp/lib/integration/post-tiny-erp.js.map +0 -1
- package/packages/apps/tiny-erp/lib/tiny-erp.js +0 -18
- package/packages/apps/tiny-erp/lib/tiny-erp.js.map +0 -1
- package/packages/apps/tiny-erp/lib/tiny-webhook.js +0 -92
- package/packages/apps/tiny-erp/lib/tiny-webhook.js.map +0 -1
- package/packages/passport/lib/firebase/authenticate-customer.js +0 -81
- package/packages/passport/lib/firebase/authenticate-customer.js.map +0 -1
- package/packages/passport/lib/firebase/serve-passport-api.js +0 -31
- package/packages/passport/lib/firebase/serve-passport-api.js.map +0 -1
- package/packages/passport/lib/firebase.js +0 -16
- package/packages/passport/lib/firebase.js.map +0 -1
- package/packages/passport/lib/index.js +0 -2
- package/packages/passport/lib/index.js.map +0 -1
- package/packages/ssr/lib/firebase/serve-feeds.js +0 -8
- package/packages/ssr/lib/firebase/serve-feeds.js.map +0 -1
- package/packages/ssr/lib/firebase/serve-storefront.js +0 -50
- package/packages/ssr/lib/firebase/serve-storefront.js.map +0 -1
- package/packages/ssr/lib/firebase.js +0 -23
- package/packages/ssr/lib/firebase.js.map +0 -1
- package/packages/ssr/lib/index.js +0 -4
- package/packages/ssr/lib/index.js.map +0 -1
- package/packages/storefront/dist/client/LoginDrawer.1061c69c.js +0 -1
- package/packages/storefront/dist/client/admin/config.json +0 -1
- package/packages/storefront/dist/client/assets/cms-preview.css +0 -274
- package/packages/storefront/dist/client/assets/cms.css +0 -114
- package/packages/storefront/dist/client/assets/cvv.png +0 -0
- package/packages/storefront/dist/client/assets/icons/bootstrap-icons/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/assets/icons/feather-icons/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/assets/icons/font-awesome/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/assets/icons/line-awesome/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/assets/icons/tabler-icons/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/assets/img-placeholder.png +0 -0
- package/packages/storefront/dist/client/assets/payments.png +0 -0
- package/packages/storefront/dist/client/assets/ssl-safe.png +0 -0
- package/packages/storefront/dist/client/chunks/LoginDrawer.4d10fa17.js +0 -1
- package/packages/storefront/dist/client/chunks/LoginForm.dd3df9d8.js +0 -1426
- package/packages/storefront/dist/client/chunks/preload-helper.f15ab524.js +0 -1
- package/packages/storefront/dist/client/chunks/runtime-dom.esm-bundler.7f8f570f.js +0 -1
- package/packages/storefront/dist/client/chunks/workbox-window.prod.es5.4b654ae6.js +0 -2
- package/packages/storefront/dist/client/client.246ab4a4.js +0 -1
- package/packages/storefront/dist/client/hoisted.71b2f749.js +0 -1
- package/packages/storefront/dist/client/img/icon.png +0 -0
- package/packages/storefront/dist/client/img/large-icon.png +0 -0
- package/packages/storefront/dist/client/img/uploads/banner1.png +0 -0
- package/packages/storefront/dist/client/img/uploads/banner2.png +0 -0
- package/packages/storefront/dist/client/img/uploads/banner2.webp +0 -0
- package/packages/storefront/dist/client/img/uploads/favicon.png +0 -0
- package/packages/storefront/dist/client/img/uploads/headless.png +0 -0
- package/packages/storefront/dist/client/img/uploads/headphone.png +0 -0
- package/packages/storefront/dist/client/img/uploads/headphone.webp +0 -0
- package/packages/storefront/dist/client/img/uploads/icon.png +0 -0
- package/packages/storefront/dist/client/img/uploads/large-icon.png +0 -0
- package/packages/storefront/dist/client/img/uploads/logo.png +0 -0
- package/packages/storefront/dist/client/img/uploads/logo.webp +0 -0
- package/packages/storefront/dist/client/img/uploads/og-image.png +0 -0
- package/packages/storefront/dist/client/img/uploads/passion.png +0 -0
- package/packages/storefront/dist/client/img/uploads/passion.webp +0 -0
- package/packages/storefront/dist/client/img/uploads/pwa-reliable.png +0 -0
- package/packages/storefront/dist/client/img/uploads/rect8589.png +0 -0
- package/packages/storefront/dist/client/img/uploads/rect859.png +0 -0
- package/packages/storefront/dist/client/img/uploads/rect89.png +0 -0
- package/packages/storefront/dist/client/img/uploads/rect89.webp +0 -0
- package/packages/storefront/dist/client/img/uploads/ssl-safe.png +0 -0
- package/packages/storefront/dist/client/manifest.webmanifest +0 -1
- package/packages/storefront/dist/client/page.3aa82516.js +0 -1
- package/packages/storefront/dist/client/robots.txt +0 -8
- package/packages/storefront/dist/client/sw.js +0 -1
- package/packages/storefront/dist/client/workbox-6f0d1f78.js +0 -1
- package/packages/storefront/dist/client/~partytown/partytown-atomics.js +0 -2
- package/packages/storefront/dist/client/~partytown/partytown-media.js +0 -2
- package/packages/storefront/dist/client/~partytown/partytown-sw.js +0 -2
- package/packages/storefront/dist/client/~partytown/partytown.js +0 -2
- package/packages/storefront/dist/server/avif/avif_node_dec.wasm +0 -0
- package/packages/storefront/dist/server/avif/avif_node_enc.wasm +0 -0
- package/packages/storefront/dist/server/entry.mjs +0 -16224
- package/packages/storefront/dist/server/mozjpeg/mozjpeg_node_dec.wasm +0 -0
- package/packages/storefront/dist/server/mozjpeg/mozjpeg_node_enc.wasm +0 -0
- package/packages/storefront/dist/server/png/squoosh_oxipng_bg.wasm +0 -0
- package/packages/storefront/dist/server/png/squoosh_png_bg.wasm +0 -0
- package/packages/storefront/dist/server/resize/squoosh_resize_bg.wasm +0 -0
- package/packages/storefront/dist/server/rotate/rotate.wasm +0 -0
- package/packages/storefront/dist/server/webp/webp_node_dec.wasm +0 -0
- package/packages/storefront/dist/server/webp/webp_node_enc.wasm +0 -0
- package/packages/storefront/src/types/cms-code.d.ts +0 -5
- package/packages/storefront/src/types/cms-contacts.d.ts +0 -5
- package/packages/storefront/src/types/cms-header.d.ts +0 -5
- package/packages/storefront/src/types/cms-settings.d.ts +0 -5
- package/packages/storefront/src/types/cms-social.d.ts +0 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AstroGlobal } from 'astro';
|
|
2
2
|
import type { BaseConfig } from '@cloudcommerce/config';
|
|
3
|
-
import type CmsSettings from '
|
|
3
|
+
import type CmsSettings from './types/cms-settings';
|
|
4
4
|
import api, { ApiError, ApiEndpoint } from '@cloudcommerce/api';
|
|
5
5
|
import _getConfig from '../../storefront.config.mjs';
|
|
6
6
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import loadPageContext, { PageContext } from '
|
|
2
|
+
import loadPageContext, { PageContext } from '@@storefront/ssr-context';
|
|
3
3
|
import api from '@cloudcommerce/api';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import InlineScripts from '../scripts/InlineScripts.astro';
|
|
4
|
+
import WildcardMain from '@@storefront/main/Wildcard.astro';
|
|
5
|
+
import PagesLayout from '../layouts/Pages.astro';
|
|
7
6
|
|
|
8
7
|
if (String(Astro.params.slug).endsWith('.css.map')) {
|
|
9
8
|
return new Response(null, { status: 404 });
|
|
@@ -30,7 +29,6 @@ export async function getStaticPaths() {
|
|
|
30
29
|
<html lang={pageContext?.lang.replace('_', '-')}>
|
|
31
30
|
{pageContext &&
|
|
32
31
|
<PagesLayout pageContext={pageContext}>
|
|
33
|
-
<InlineScripts slot="before-head-end" />
|
|
34
32
|
<WildcardMain pageContext={pageContext} />
|
|
35
33
|
</PagesLayout>
|
|
36
34
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
import loadPageContext, { PageContext } from '
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import InlineScripts from '../scripts/InlineScripts.astro';
|
|
2
|
+
import loadPageContext, { PageContext } from '@@storefront/ssr-context';
|
|
3
|
+
import FallbackMain from '@@storefront/main/Fallback.astro';
|
|
4
|
+
import PagesLayout from '../layouts/Pages.astro';
|
|
6
5
|
|
|
7
6
|
let pageContext: PageContext;
|
|
8
7
|
try {
|
|
@@ -15,7 +14,6 @@ try {
|
|
|
15
14
|
<!DOCTYPE html>
|
|
16
15
|
<html lang={pageContext?.lang.replace('_', '-')}>
|
|
17
16
|
<PagesLayout pageContext={pageContext}>
|
|
18
|
-
<InlineScripts slot="before-head-end" />
|
|
19
17
|
<FallbackMain pageContext={pageContext} />
|
|
20
18
|
</PagesLayout>
|
|
21
19
|
</html>
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
import loadPageContext, { PageContext } from '
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import InlineScripts from '../scripts/InlineScripts.astro';
|
|
2
|
+
import loadPageContext, { PageContext } from '@@storefront/ssr-context';
|
|
3
|
+
import HomeMain from '@@storefront/main/Home.astro';
|
|
4
|
+
import PagesLayout from '../layouts/Pages.astro';
|
|
6
5
|
|
|
7
6
|
let pageContext: PageContext;
|
|
8
7
|
let loadError: any;
|
|
@@ -20,7 +19,6 @@ try {
|
|
|
20
19
|
<html lang={pageContext?.lang.replace('_', '-')}>
|
|
21
20
|
{pageContext &&
|
|
22
21
|
<PagesLayout pageContext={pageContext}>
|
|
23
|
-
<InlineScripts slot="before-head-end" />
|
|
24
22
|
<HomeMain pageContext={pageContext} />
|
|
25
23
|
</PagesLayout>
|
|
26
24
|
}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"jsx": "preserve",
|
|
5
5
|
"paths": {
|
|
6
|
-
"
|
|
6
|
+
"@@i18n": ["./node_modules/@cloudcommerce/i18n/src/pt_br.ts"],
|
|
7
|
+
"@@storefront/*": ["./src/lib/*"],
|
|
8
|
+
"@@components/*": ["./src/lib/components/*", "./src/lib/components/*.vue"],
|
|
7
9
|
}
|
|
8
10
|
}
|
|
9
11
|
}
|
|
@@ -73,6 +73,14 @@ const _preflights: Preflight[] = [{
|
|
|
73
73
|
--secondary-hover: var(--secondary-700);
|
|
74
74
|
--secondary-focus: rgba(var(--secondary-200-rgb), 0.2);
|
|
75
75
|
--secondary-inverse: var(--secondary-500-yiq);
|
|
76
|
+
}
|
|
77
|
+
@media only screen and (prefers-color-scheme: dark) {
|
|
78
|
+
:root:not([data-theme=light]) {
|
|
79
|
+
--gray: var(--gray-400);
|
|
80
|
+
--gray-accent: var(--gray-200);
|
|
81
|
+
--surface-color: var(--gray-800);
|
|
82
|
+
--surface-border-color: var(--gray-700);
|
|
83
|
+
}
|
|
76
84
|
}`,
|
|
77
85
|
}];
|
|
78
86
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './mercadopago';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,cAAc,eAAe,CAAC"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import '@cloudcommerce/firebase/lib/init';
|
|
2
|
-
import type { AppModuleBody } from '@cloudcommerce/types';
|
|
3
|
-
export declare const listPayments: (modBody: AppModuleBody) => Promise<import("@cloudcommerce/types").ListPaymentsResponse | {
|
|
4
|
-
error: string;
|
|
5
|
-
message: string;
|
|
6
|
-
}>;
|
|
7
|
-
export declare const createTransaction: (modBody: AppModuleBody) => Promise<{
|
|
8
|
-
status: number;
|
|
9
|
-
redirect_to_payment: boolean;
|
|
10
|
-
transaction: {
|
|
11
|
-
payment_link?: string | undefined;
|
|
12
|
-
payment_instructions?: string | undefined;
|
|
13
|
-
intermediator?: {
|
|
14
|
-
transaction_id?: string | undefined;
|
|
15
|
-
transaction_code?: string | undefined;
|
|
16
|
-
transaction_reference?: string | undefined;
|
|
17
|
-
payment_method?: {
|
|
18
|
-
code: string;
|
|
19
|
-
name?: string | undefined;
|
|
20
|
-
} | undefined;
|
|
21
|
-
buyer_id?: string | undefined;
|
|
22
|
-
} | undefined;
|
|
23
|
-
credit_card?: {
|
|
24
|
-
holder_name?: string | undefined;
|
|
25
|
-
avs_result_code?: string | null | undefined;
|
|
26
|
-
cvv_result_code?: string | null | undefined;
|
|
27
|
-
bin?: number | undefined;
|
|
28
|
-
company?: string | undefined;
|
|
29
|
-
last_digits?: string | undefined;
|
|
30
|
-
token?: string | undefined;
|
|
31
|
-
error_code?: "incorrect_number" | "invalid_number" | "invalid_expiry_date" | "invalid_cvc" | "expired_card" | "incorrect_cvc" | "incorrect_zip" | "incorrect_address" | "card_declined" | "processing_error" | "call_issuer" | "pick_up_card" | undefined;
|
|
32
|
-
} | undefined;
|
|
33
|
-
banking_billet?: {
|
|
34
|
-
code?: string | undefined;
|
|
35
|
-
valid_thru?: string | undefined;
|
|
36
|
-
text_lines?: string[] | undefined;
|
|
37
|
-
link?: string | undefined;
|
|
38
|
-
} | undefined;
|
|
39
|
-
loyalty_points?: {
|
|
40
|
-
name?: string | undefined;
|
|
41
|
-
program_id: string;
|
|
42
|
-
points_value: number;
|
|
43
|
-
ratio?: number | undefined;
|
|
44
|
-
} | undefined;
|
|
45
|
-
currency_id?: string | undefined;
|
|
46
|
-
currency_symbol?: string | undefined;
|
|
47
|
-
discount?: number | undefined;
|
|
48
|
-
amount: number;
|
|
49
|
-
installments?: {
|
|
50
|
-
number: number;
|
|
51
|
-
value?: number | undefined;
|
|
52
|
-
tax?: boolean | undefined;
|
|
53
|
-
total?: number | undefined;
|
|
54
|
-
} | undefined;
|
|
55
|
-
creditor_fees?: {
|
|
56
|
-
installment?: number | undefined;
|
|
57
|
-
operational?: number | undefined;
|
|
58
|
-
intermediation?: number | undefined;
|
|
59
|
-
other?: number | undefined;
|
|
60
|
-
} | undefined;
|
|
61
|
-
status?: {
|
|
62
|
-
updated_at?: string | undefined;
|
|
63
|
-
current: "voided" | "under_analysis" | "paid" | "pending" | "authorized" | "unauthorized" | "in_dispute" | "refunded" | "unknown";
|
|
64
|
-
} | undefined;
|
|
65
|
-
flags?: string[] | undefined;
|
|
66
|
-
custom_fields?: {
|
|
67
|
-
field: string;
|
|
68
|
-
value: string;
|
|
69
|
-
}[] | undefined;
|
|
70
|
-
notes?: string | undefined;
|
|
71
|
-
};
|
|
72
|
-
message?: undefined;
|
|
73
|
-
error?: undefined;
|
|
74
|
-
} | {
|
|
75
|
-
status: number;
|
|
76
|
-
message: string;
|
|
77
|
-
redirect_to_payment?: undefined;
|
|
78
|
-
transaction?: undefined;
|
|
79
|
-
error?: undefined;
|
|
80
|
-
} | {
|
|
81
|
-
status: number;
|
|
82
|
-
error: string;
|
|
83
|
-
message: any;
|
|
84
|
-
redirect_to_payment?: undefined;
|
|
85
|
-
transaction?: undefined;
|
|
86
|
-
}>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import '@cloudcommerce/firebase/lib/init';
|
|
2
|
-
// eslint-disable-next-line import/no-unresolved
|
|
3
|
-
import { getFirestore } from 'firebase-admin/firestore';
|
|
4
|
-
// eslint-disable-next-line import/no-unresolved
|
|
5
|
-
import handleListPayments from './mp-list-payments.js';
|
|
6
|
-
import handleCreateTransaction from './mp-create-transaction.js';
|
|
7
|
-
|
|
8
|
-
export const listPayments = async (modBody) => {
|
|
9
|
-
return handleListPayments(modBody);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const createTransaction = async (modBody) => {
|
|
13
|
-
return handleCreateTransaction(modBody, getFirestore());
|
|
14
|
-
};
|
|
15
|
-
// # sourceMappingURL=mercadopago.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mercadopago.js","sourceRoot":"","sources":["../src/mercadopago.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAG1C,gDAAgD;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,gDAAgD;AAChD,OAAO,kBAAkB,MAAM,oBAAoB,CAAC;AACpD,OAAO,uBAAuB,MAAM,yBAAyB,CAAC;AAE9D,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,OAAsB,EAAE,EAAE;IAC3D,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EAAE,OAAsB,EAAE,EAAE;IAChE,OAAO,uBAAuB,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;AAC1D,CAAC,CAAC"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { AppModuleBody } from '@cloudcommerce/types';
|
|
2
|
-
import type { Firestore } from 'firebase-admin/firestore';
|
|
3
|
-
declare const parsePaymentStatus: (status: string) => "voided" | "under_analysis" | "paid" | "pending";
|
|
4
|
-
declare const _default: (appData: AppModuleBody, firestore: Firestore) => Promise<{
|
|
5
|
-
status: number;
|
|
6
|
-
redirect_to_payment: boolean;
|
|
7
|
-
transaction: {
|
|
8
|
-
payment_link?: string | undefined;
|
|
9
|
-
payment_instructions?: string | undefined;
|
|
10
|
-
intermediator?: {
|
|
11
|
-
transaction_id?: string | undefined;
|
|
12
|
-
transaction_code?: string | undefined;
|
|
13
|
-
transaction_reference?: string | undefined;
|
|
14
|
-
payment_method?: {
|
|
15
|
-
code: string;
|
|
16
|
-
name?: string | undefined;
|
|
17
|
-
} | undefined;
|
|
18
|
-
buyer_id?: string | undefined;
|
|
19
|
-
} | undefined;
|
|
20
|
-
credit_card?: {
|
|
21
|
-
holder_name?: string | undefined;
|
|
22
|
-
avs_result_code?: string | null | undefined;
|
|
23
|
-
cvv_result_code?: string | null | undefined;
|
|
24
|
-
bin?: number | undefined;
|
|
25
|
-
company?: string | undefined;
|
|
26
|
-
last_digits?: string | undefined;
|
|
27
|
-
token?: string | undefined;
|
|
28
|
-
error_code?: "incorrect_number" | "invalid_number" | "invalid_expiry_date" | "invalid_cvc" | "expired_card" | "incorrect_cvc" | "incorrect_zip" | "incorrect_address" | "card_declined" | "processing_error" | "call_issuer" | "pick_up_card" | undefined;
|
|
29
|
-
} | undefined;
|
|
30
|
-
banking_billet?: {
|
|
31
|
-
code?: string | undefined;
|
|
32
|
-
valid_thru?: string | undefined;
|
|
33
|
-
text_lines?: string[] | undefined;
|
|
34
|
-
link?: string | undefined;
|
|
35
|
-
} | undefined;
|
|
36
|
-
loyalty_points?: {
|
|
37
|
-
name?: string | undefined;
|
|
38
|
-
program_id: string;
|
|
39
|
-
points_value: number;
|
|
40
|
-
ratio?: number | undefined;
|
|
41
|
-
} | undefined;
|
|
42
|
-
currency_id?: string | undefined;
|
|
43
|
-
currency_symbol?: string | undefined;
|
|
44
|
-
discount?: number | undefined;
|
|
45
|
-
amount: number;
|
|
46
|
-
installments?: {
|
|
47
|
-
number: number;
|
|
48
|
-
value?: number | undefined;
|
|
49
|
-
tax?: boolean | undefined;
|
|
50
|
-
total?: number | undefined;
|
|
51
|
-
} | undefined;
|
|
52
|
-
creditor_fees?: {
|
|
53
|
-
installment?: number | undefined;
|
|
54
|
-
operational?: number | undefined;
|
|
55
|
-
intermediation?: number | undefined;
|
|
56
|
-
other?: number | undefined;
|
|
57
|
-
} | undefined;
|
|
58
|
-
status?: {
|
|
59
|
-
updated_at?: string | undefined;
|
|
60
|
-
current: "voided" | "under_analysis" | "paid" | "pending" | "authorized" | "unauthorized" | "in_dispute" | "refunded" | "unknown";
|
|
61
|
-
} | undefined;
|
|
62
|
-
flags?: string[] | undefined;
|
|
63
|
-
custom_fields?: {
|
|
64
|
-
field: string;
|
|
65
|
-
value: string;
|
|
66
|
-
}[] | undefined;
|
|
67
|
-
notes?: string | undefined;
|
|
68
|
-
};
|
|
69
|
-
message?: undefined;
|
|
70
|
-
error?: undefined;
|
|
71
|
-
} | {
|
|
72
|
-
status: number;
|
|
73
|
-
message: string;
|
|
74
|
-
redirect_to_payment?: undefined;
|
|
75
|
-
transaction?: undefined;
|
|
76
|
-
error?: undefined;
|
|
77
|
-
} | {
|
|
78
|
-
status: number;
|
|
79
|
-
error: string;
|
|
80
|
-
message: any;
|
|
81
|
-
redirect_to_payment?: undefined;
|
|
82
|
-
transaction?: undefined;
|
|
83
|
-
}>;
|
|
84
|
-
export default _default;
|
|
85
|
-
export { parsePaymentStatus, };
|
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { logger } from 'firebase-functions';
|
|
2
|
-
import config from '@cloudcommerce/firebase/lib/config';
|
|
3
|
-
import axios from 'axios';
|
|
4
|
-
|
|
5
|
-
const parsePaymentStatus = (status) => {
|
|
6
|
-
switch (status) {
|
|
7
|
-
case 'rejected':
|
|
8
|
-
return 'voided';
|
|
9
|
-
case 'in_process':
|
|
10
|
-
return 'under_analysis';
|
|
11
|
-
case 'approved':
|
|
12
|
-
return 'paid';
|
|
13
|
-
default:
|
|
14
|
-
return 'pending';
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default async (appData, firestore) => {
|
|
19
|
-
const locationId = config.get().httpsFunctionOptions.region;
|
|
20
|
-
const baseUri = `https://${locationId}-${process.env.GCLOUD_PROJECT}.cloudfunctions.net`;
|
|
21
|
-
// body was already pre-validated on @/bin/web.js
|
|
22
|
-
// treat module request body
|
|
23
|
-
const { application, storeId } = appData;
|
|
24
|
-
const { params } = appData;
|
|
25
|
-
// app configured options
|
|
26
|
-
const configApp = { ...application.data, ...application.hidden_data };
|
|
27
|
-
const notificationUrl = `${baseUri}/mercadopago-webhook`;
|
|
28
|
-
let token;
|
|
29
|
-
let paymentMethodId;
|
|
30
|
-
const isPix = params.payment_method.code === 'account_deposit';
|
|
31
|
-
if (params.credit_card && params.credit_card.hash) {
|
|
32
|
-
const hashParts = params.credit_card.hash.split(' // ');
|
|
33
|
-
[token] = hashParts;
|
|
34
|
-
try {
|
|
35
|
-
paymentMethodId = JSON.parse(hashParts[1]).payment_method_id;
|
|
36
|
-
} catch (e) {
|
|
37
|
-
paymentMethodId = params.credit_card.company || 'visa';
|
|
38
|
-
}
|
|
39
|
-
} else if (params.payment_method.code === 'banking_billet') {
|
|
40
|
-
paymentMethodId = 'bolbradesco';
|
|
41
|
-
} else if (params.payment_method.code === 'account_deposit') {
|
|
42
|
-
paymentMethodId = 'pix';
|
|
43
|
-
} else {
|
|
44
|
-
return {
|
|
45
|
-
status: 400,
|
|
46
|
-
error: 'NO_CARD_ERR',
|
|
47
|
-
message: 'Credit card hash is required',
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
const { buyer } = params;
|
|
51
|
-
const orderId = params.order_id;
|
|
52
|
-
logger.log('> MP Transaction #', storeId, orderId);
|
|
53
|
-
// https://www.mercadopago.com.br/developers/pt/reference/payments/_payments/post/
|
|
54
|
-
const payerPhone = {
|
|
55
|
-
area_code: buyer.phone.number.substring(0, 2),
|
|
56
|
-
number: buyer.phone.number.substring(2, 11),
|
|
57
|
-
};
|
|
58
|
-
const additionalInfo = {
|
|
59
|
-
items: [],
|
|
60
|
-
payer: {
|
|
61
|
-
first_name: buyer.fullname.replace(/\s.*/, ''),
|
|
62
|
-
last_name: buyer.fullname.replace(/[^\s]+\s/, ''),
|
|
63
|
-
phone: payerPhone,
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
if (params.to && params.to.street) {
|
|
67
|
-
additionalInfo.shipments = {
|
|
68
|
-
receiver_address: {
|
|
69
|
-
zip_code: params.to.zip,
|
|
70
|
-
street_name: params.to.street,
|
|
71
|
-
street_number: params.to.number || 0,
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
if (params.billing_address && params.billing_address.street) {
|
|
76
|
-
additionalInfo.payer.address = {
|
|
77
|
-
zip_code: params.billing_address.zip,
|
|
78
|
-
street_name: params.billing_address.street,
|
|
79
|
-
street_number: params.billing_address.number || 0,
|
|
80
|
-
};
|
|
81
|
-
} else if (additionalInfo.shipments) {
|
|
82
|
-
additionalInfo.payer.address = additionalInfo.shipments.receiver_address;
|
|
83
|
-
}
|
|
84
|
-
if (Array.isArray(params.items)) {
|
|
85
|
-
params.items.forEach((item) => {
|
|
86
|
-
additionalInfo.items.push({
|
|
87
|
-
id: item.sku || item.variation_id || item.product_id,
|
|
88
|
-
title: item.name || item.sku,
|
|
89
|
-
description: item.name || item.sku,
|
|
90
|
-
quantity: item.quantity,
|
|
91
|
-
unit_price: item.final_price || item.price,
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
const payerOrBuyer = {
|
|
96
|
-
...buyer,
|
|
97
|
-
...params.payer,
|
|
98
|
-
};
|
|
99
|
-
Object.keys(payerOrBuyer).forEach((field) => {
|
|
100
|
-
if (!payerOrBuyer[field] && buyer[field]) {
|
|
101
|
-
payerOrBuyer[field] = buyer[field];
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
const payment = {
|
|
105
|
-
payer: {
|
|
106
|
-
type: 'customer',
|
|
107
|
-
email: buyer.email,
|
|
108
|
-
first_name: payerOrBuyer.fullname.replace(/\s.*/, ''),
|
|
109
|
-
last_name: payerOrBuyer.fullname.replace(/[^\s]+\s/, ''),
|
|
110
|
-
identification: {
|
|
111
|
-
type: payerOrBuyer.registry_type === 'j' ? 'CNPJ' : 'CPF',
|
|
112
|
-
number: String(payerOrBuyer.doc_number),
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
external_reference: String(params.order_number),
|
|
116
|
-
transaction_amount: params.amount.total,
|
|
117
|
-
description: `Pedido #${params.order_number} de ${buyer.fullname}`.substring(0, 60),
|
|
118
|
-
payment_method_id: paymentMethodId,
|
|
119
|
-
token,
|
|
120
|
-
statement_descriptor: configApp.statement_descriptor || `${params.domain}_MercadoPago`,
|
|
121
|
-
installments: params.installments_number || 1,
|
|
122
|
-
notification_url: notificationUrl,
|
|
123
|
-
additional_info: additionalInfo,
|
|
124
|
-
metadata: {
|
|
125
|
-
ecom_store_id: storeId,
|
|
126
|
-
ecom_order_id: orderId,
|
|
127
|
-
},
|
|
128
|
-
};
|
|
129
|
-
logger.log('>data: ', JSON.stringify(payment));
|
|
130
|
-
try {
|
|
131
|
-
// https://www.mercadopago.com.br/developers/pt/reference/payments/_payments/post
|
|
132
|
-
const { data } = await axios({
|
|
133
|
-
url: 'https://api.mercadopago.com/v1/payments',
|
|
134
|
-
method: 'post',
|
|
135
|
-
headers: {
|
|
136
|
-
Authorization: `Bearer ${configApp.mp_access_token}`,
|
|
137
|
-
'Content-Type': 'application/json',
|
|
138
|
-
},
|
|
139
|
-
data: payment,
|
|
140
|
-
});
|
|
141
|
-
if (data) {
|
|
142
|
-
logger.log('> MP Checkout #', storeId, orderId);
|
|
143
|
-
const statusPayment = parsePaymentStatus(data.status);
|
|
144
|
-
let isSaveRetry = false;
|
|
145
|
-
const saveToDb = () => {
|
|
146
|
-
return new Promise((resolve, reject) => {
|
|
147
|
-
firestore.collection('mp_payments')
|
|
148
|
-
.doc(String(data.id))
|
|
149
|
-
.set({
|
|
150
|
-
transaction_code: data.id,
|
|
151
|
-
store_id: storeId,
|
|
152
|
-
order_id: orderId,
|
|
153
|
-
status: statusPayment,
|
|
154
|
-
paymentMethod: paymentMethodId,
|
|
155
|
-
notificationUrl,
|
|
156
|
-
}, {
|
|
157
|
-
merge: true,
|
|
158
|
-
})
|
|
159
|
-
.then(() => {
|
|
160
|
-
logger.log('> Payment #', String(data.id));
|
|
161
|
-
resolve(true);
|
|
162
|
-
})
|
|
163
|
-
.catch((err) => {
|
|
164
|
-
if (err.code === 13 && !isSaveRetry) {
|
|
165
|
-
isSaveRetry = true;
|
|
166
|
-
setTimeout(saveToDb, 500);
|
|
167
|
-
} else {
|
|
168
|
-
logger.error('PAYMENT_SAVE_ERR', err);
|
|
169
|
-
reject(err);
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
};
|
|
174
|
-
await saveToDb();
|
|
175
|
-
const transaction = {
|
|
176
|
-
amount: data.transaction_details.total_paid_amount,
|
|
177
|
-
currency_id: data.currency_id,
|
|
178
|
-
intermediator: {
|
|
179
|
-
payment_method: {
|
|
180
|
-
code: paymentMethodId || params.payment_method.code,
|
|
181
|
-
},
|
|
182
|
-
transaction_id: String(data.id),
|
|
183
|
-
transaction_code: String(data.id),
|
|
184
|
-
transaction_reference: data.external_reference,
|
|
185
|
-
},
|
|
186
|
-
status: {
|
|
187
|
-
current: statusPayment,
|
|
188
|
-
},
|
|
189
|
-
};
|
|
190
|
-
if (params.payment_method.code === 'credit_card') {
|
|
191
|
-
if (data.card) {
|
|
192
|
-
transaction.credit_card = {
|
|
193
|
-
holder_name: data.card.cardholder.name,
|
|
194
|
-
last_digits: data.card.last_four_digits,
|
|
195
|
-
token,
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
if (data.installments) {
|
|
199
|
-
transaction.installments = {
|
|
200
|
-
number: data.installments,
|
|
201
|
-
tax: (data.transaction_details.total_paid_amount > data.transaction_amount),
|
|
202
|
-
total: data.transaction_details.total_paid_amount,
|
|
203
|
-
value: data.transaction_details.installment_amount,
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
} else if (!isPix && data.transaction_details
|
|
207
|
-
&& data.transaction_details.external_resource_url) {
|
|
208
|
-
transaction.payment_link = data.transaction_details.external_resource_url;
|
|
209
|
-
transaction.banking_billet = {
|
|
210
|
-
link: transaction.payment_link,
|
|
211
|
-
};
|
|
212
|
-
if (data.date_of_expiration) {
|
|
213
|
-
const dateValidThru = new Date(data.date_of_expiration);
|
|
214
|
-
if (dateValidThru.getTime() > 0) {
|
|
215
|
-
transaction.banking_billet.valid_thru = dateValidThru.toISOString();
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
} else if (isPix && data.point_of_interaction && data.point_of_interaction.transaction_data) {
|
|
219
|
-
// https://www.mercadopago.com.br/developers/pt/docs/checkout-api/integration-configuration/integrate-with-pix#bookmark_visualiza%C3%A7%C3%A3o_de_pagamento
|
|
220
|
-
const qrCode = data.point_of_interaction.transaction_data.qr_code;
|
|
221
|
-
const qrCodeBase64 = data.point_of_interaction.transaction_data.qr_code_base64;
|
|
222
|
-
transaction.notes = '<div style="display:block;margin:0 auto"> '
|
|
223
|
-
+ `<img width="280" height="280" style="margin:5px auto" src='data:image/jpeg;base64,${qrCodeBase64}'/> `
|
|
224
|
-
+ `<lable> ${qrCode} </label></div>`;
|
|
225
|
-
}
|
|
226
|
-
return {
|
|
227
|
-
status: 200,
|
|
228
|
-
redirect_to_payment: false,
|
|
229
|
-
transaction,
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
return {
|
|
233
|
-
status: 409,
|
|
234
|
-
message: `CREATE_TRANSACTION_ERR #${storeId} - ${orderId} => MP not response`,
|
|
235
|
-
};
|
|
236
|
-
} catch (error) {
|
|
237
|
-
let { message } = error;
|
|
238
|
-
//
|
|
239
|
-
const err = {
|
|
240
|
-
message: `CREATE_TRANSACTION_ERR #${storeId} - ${orderId} => ${message}`,
|
|
241
|
-
payment: '',
|
|
242
|
-
status: 0,
|
|
243
|
-
response: '',
|
|
244
|
-
};
|
|
245
|
-
if (error.response) {
|
|
246
|
-
const { status, data } = error.response;
|
|
247
|
-
if (status !== 401 && status !== 403) {
|
|
248
|
-
err.payment = JSON.stringify(payment);
|
|
249
|
-
err.status = status;
|
|
250
|
-
if (typeof data === 'object' && data) {
|
|
251
|
-
err.response = JSON.stringify(data);
|
|
252
|
-
} else {
|
|
253
|
-
err.response = data;
|
|
254
|
-
}
|
|
255
|
-
if (typeof data.message === 'string' && data.message) {
|
|
256
|
-
message = data.message;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
logger.error(err);
|
|
261
|
-
return {
|
|
262
|
-
status: 409,
|
|
263
|
-
error: 'CREATE_TRANSACTION_ERR',
|
|
264
|
-
message,
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
export { parsePaymentStatus };
|
|
270
|
-
// # sourceMappingURL=mp-create-transaction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3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@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { AppModuleBody } from '@cloudcommerce/types';
|
|
2
|
-
import type { ListPaymentsResponse } from '@cloudcommerce/types/modules/list_payments:response';
|
|
3
|
-
declare const _default: (data: AppModuleBody) => ListPaymentsResponse | {
|
|
4
|
-
error: string;
|
|
5
|
-
message: string;
|
|
6
|
-
};
|
|
7
|
-
export default _default;
|