mirror of
https://github.com/valitydev/checkout.git
synced 2024-11-06 02:25:18 +00:00
APM-5: Fix digital wallet flow (#50)
This commit is contained in:
parent
91b5c51144
commit
33d0be9e80
@ -1,4 +1,4 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["local>valitydev/.github:renovate-config"]
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["local>valitydev/.github:renovate-config"]
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import * as React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { Field, WrappedFieldProps } from 'redux-form';
|
||||
|
||||
import { State } from 'checkout/state';
|
||||
import { KnownDigitalWalletProviders, State } from 'checkout/state';
|
||||
import { Locale } from 'checkout/locale';
|
||||
import { Letter } from 'checkout/components';
|
||||
import { formatEmail, isError, validateEmail } from 'checkout/utils';
|
||||
@ -18,7 +18,7 @@ const getCustomInput = (props: EmailDefProps, fieldProps: WrappedFieldProps) =>
|
||||
{...fieldProps.meta}
|
||||
error={isError(fieldProps.meta)}
|
||||
icon={<Letter />}
|
||||
placeholder={props.locale['digital.wallet.providers'].sticpay.fields.account}
|
||||
placeholder={props.locale['digital.wallet.providers'][KnownDigitalWalletProviders.Sticpay].fields.account}
|
||||
mark={true}
|
||||
type="email"
|
||||
id="sticpay-account-input"
|
||||
|
@ -6,7 +6,7 @@ import { SticpayAccount } from './fields';
|
||||
|
||||
export const WalletProviderFormGroup: React.FC<{ provider: KnownDigitalWalletProviders }> = (props) => {
|
||||
switch (props.provider) {
|
||||
case KnownDigitalWalletProviders.sticpay:
|
||||
case KnownDigitalWalletProviders.Sticpay:
|
||||
return (
|
||||
<FormGroup>
|
||||
<SticpayAccount />
|
||||
|
@ -6,7 +6,7 @@ import { assertUnreachable } from 'checkout/utils';
|
||||
|
||||
export const Logo: React.FC<{ provider: KnownDigitalWalletProviders }> = ({ provider }) => {
|
||||
switch (provider) {
|
||||
case KnownDigitalWalletProviders.sticpay:
|
||||
case KnownDigitalWalletProviders.Sticpay:
|
||||
return <ReactSVG src="/assets/wallet-providers/logos/sticpay.svg" />;
|
||||
default:
|
||||
assertUnreachable(provider);
|
||||
@ -20,6 +20,7 @@ export const Container = styled.div`
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 20px;
|
||||
height: 48px;
|
||||
`;
|
||||
|
||||
export const WalletProviderLogo: React.FC<{ provider: KnownDigitalWalletProviders }> = (props) => (
|
||||
|
@ -15,7 +15,7 @@ const toWalletProvider = (props: SticpayPaymentMethodItemProps) =>
|
||||
|
||||
const Icon: React.FC<{ provider: KnownDigitalWalletProviders }> = ({ provider }) => {
|
||||
switch (provider) {
|
||||
case KnownDigitalWalletProviders.sticpay:
|
||||
case KnownDigitalWalletProviders.Sticpay:
|
||||
return <ReactSVG src="/assets/wallet-providers/logos/sticpay.svg" />;
|
||||
default:
|
||||
assertUnreachable(provider);
|
||||
|
@ -6,7 +6,7 @@ import { assertUnreachable } from 'checkout/utils';
|
||||
|
||||
const getID = (formValues: WalletFormValues): string => {
|
||||
switch (formValues.provider) {
|
||||
case KnownDigitalWalletProviders.sticpay:
|
||||
case KnownDigitalWalletProviders.Sticpay:
|
||||
return (formValues as SticpayWalletFormValues).sticpayAccount;
|
||||
default:
|
||||
assertUnreachable(formValues.provider);
|
||||
|
@ -6,7 +6,7 @@ export interface PaymentMethod {
|
||||
}
|
||||
|
||||
export enum KnownDigitalWalletProviders {
|
||||
sticpay = 'sticpay'
|
||||
Sticpay = 'Sticpay'
|
||||
}
|
||||
|
||||
export interface DigitalWalletPaymentMethod extends PaymentMethod {
|
||||
|
@ -149,7 +149,7 @@
|
||||
"RejectedByIssuer": "Rejected by issuing bank",
|
||||
"PaymentRejected": "Payment is rejected",
|
||||
"digital.wallet.providers": {
|
||||
"sticpay": {
|
||||
"Sticpay": {
|
||||
"name": "Sticpay",
|
||||
"fields": {
|
||||
"account": "Sticpay account (email)"
|
||||
|
@ -149,7 +149,7 @@
|
||||
"RejectedByIssuer": "Отклонено эмитентом",
|
||||
"PaymentRejected": "Платёж отклонен",
|
||||
"digital.wallet.providers": {
|
||||
"sticpay": {
|
||||
"Sticpay": {
|
||||
"name": "Sticpay",
|
||||
"fields": {
|
||||
"account": "Sticpay account (email)"
|
||||
|
Loading…
Reference in New Issue
Block a user