sequenceDiagram
Front ->>+ Saleor: Mutation paymentGatewayInitialize,<br>amount, list of<br>payment gateways IDs<br>to initialize and <br>data, if<br>old ID provided, return<br>error
Saleor ->>+ PaymentApp: payment-gateway-initialize-session<br>webhook
PaymentApp ->>+ PaymentProvider: Initialize payment gateway
PaymentProvider -->>- PaymentApp: Data mandatory to<br>initialize the payment<br>on fronted
PaymentApp -->>- Saleor: PaymentGateway data with config
Saleor -->>- Front: List of PaymentGateway data and configs
Front ->>+ Saleor: TransactionInitialize<br> with amount and<br>payment gateway ID, data
Saleor ->> Saleor: Create TransactionItem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"title":"Colors","description":":purple_square: - Purple\n:blue_square: - Blue\n:green_square: - Green\n:yellow_square: - Yellow\n:orange_square: - Orange\n:red_square: - Red","color":2105893} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"title":"Colors","description":":purple_square: - Purple\n:blue_square: - Blue\n:green_square: - Green\n:yellow_square: - Yellow\n:orange_square: - Orange\n:red_square: - Red","color":2105893} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Dialog, Transition } from '@headlessui/react' | |
import { Fragment, useState, useRef } from 'react' | |
import classnames from 'classnames' | |
const Modal = ({ | |
isOpen = false, | |
onClose, | |
size = undefined, | |
title, | |
titleClassName, | |
hideCloseIcon = false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import api from 'api.js' | |
function MyApp({ Component, pageProps, router: { route } }) { | |
const naviMonitor = (response) => { | |
console.log('monitor', response) | |
if (!response.ok) { | |
const error = new Error(response.data?.message) | |
error.status = response.data?.code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Providers from 'next-auth/providers' | |
import NextAuth from 'next-auth' | |
const api = new RestClient() | |
import { RestClient } from 'lib/api' | |
import { differenceInDays } from 'date-fns' | |
const checkExpiredTime = (expired_time) => { | |
const dt = new Date(expired_time) | |
const now = new Date() | |
if (differenceInDays(dt, now) <= 10) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import classnames from 'classnames' | |
const Tab = ({ menus, value, onChange }) => { | |
return ( | |
<nav className="flex justify-between sm:justify-start mx-auto container bg-white shadow-md"> | |
{menus.map((menu, index) => ( | |
<button | |
onClick={() => onChange?.(menu)} | |
disabled={menu?.disabled} | |
key={index} |