Implements custom checkout along with ordercloud provider

This commit is contained in:
goncy
2021-09-14 15:37:17 -03:00
parent a7c13d2d42
commit 30744c5a6c
67 changed files with 1886 additions and 174 deletions

View File

@@ -1,14 +1,15 @@
import { FC } from 'react'
import s from './PaymentWidget.module.css'
import { ChevronRight, CreditCard } from '@components/icons'
import { ChevronRight, CreditCard, Check } from '@components/icons'
interface ComponentProps {
onClick?: () => any
onClick?: () => any;
isValid?: boolean;
}
const PaymentWidget: FC<ComponentProps> = ({ onClick }) => {
/* Shipping Address
Only available with checkout set to true -
const PaymentWidget: FC<ComponentProps> = ({ onClick, isValid }) => {
/* Shipping Address
Only available with checkout set to true -
This means that the provider does offer checkout functionality. */
return (
<div onClick={onClick} className={s.root}>
@@ -20,7 +21,7 @@ const PaymentWidget: FC<ComponentProps> = ({ onClick }) => {
{/* <span>VISA #### #### #### 2345</span> */}
</div>
<div>
<ChevronRight />
{isValid ? <Check /> : <ChevronRight />}
</div>
</div>
)