Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Document Status

Status
colourGreen
titleREVIEWED

Document Owner(s)

Capovilla, Evandro

Reviewers

Table of Contents

✅ Proposed Solution

...

After the user makes a payment request and closes the app, we need to ensure the user knows what happened to their order. This involves two developments: one is a new component to handle pending payments, and the other is a page to which the user will be redirected when attempting to view their there are pending payments available.

Create a reusable component to search for pending payment

On the main screen of the Whitelabel app, we will add a component similar to the order tracking feature. However, this component will specifically monitor pending payments that are still within the payment deadline.

The primary goal of this component is to provide clarity to users who may close the Whitelabel app during the payment process. It ensures that users do not mistakenly believe their payment has been canceled. Even if the user closes the app, we do not have the capability to cancel their payment request in the MBWay application.

This component will include a button labeled SHOW which will redirect the user to a new MBWay page, that will be detailed in the next topic.

...

Info

Remember that waiting for payment is a feature for all payment methods, but for it to be displayed, two conditions must be met:

  • The order must not be paid yet. (PRICE_SUCESSFUL and PAYMENT_REQUIRED)

  • The request must contain the paymentRequestCreatedAt property in the payment property.

Create Reusable Waiting Payment Page for order pending

This page reuses the same component as the mb payment details ensuring that users are familiar with the layout and can easily find the information they need. The primary objective of this page is to offer users comprehensive details about their pending MBWay payments, in scenarios where they might have closed the whitelabel app during the payment process. It helps clarify the payment status and guides users on completing their transactions successfully.

Info

Importantly, only the most recent pending order will be displayed to the user, focusing their attention on the latest transaction.

...

Backend

Create Payment Request

To create a payment request for MBWay, it is necessary to add a new endpoint called InitiatePayment that handles the initialization of a new payment. Unlike the GenerateCheckoutLink, which is used for other payment methods, in the case of MBWay, we will not generate a link. Instead, we will request Paycomet to create a payment request in the customer's MBWay account.

Info

The InitiatePayment endpoint was created specifically for this purpose: to request or initiate a payment that will be processed outside the whitelabel.

...

title Create Payment Request participant Frontend participant Graphql/Fulfillment participant DB participant Payment Service participant PSP Service participant Paycomet External Frontend->Graphql/Fulfillment: Initiate Payment Graphql/Fulfillment->Payment Service
Expand
titlehttps://sequencediagram.org/ - Create Payment Request
Code Block
Info

Remember that waiting for payment is a feature for all payment methods, but for it to be displayed, two conditions must be met:

  • The order must not be paid yet. (PRICE_SUCESSFUL and PAYMENT_REQUIRED)

  • The request must contain the paymentRequestTimeLimit property in the payment property.

Create Reusable Waiting Payment Page for order pending

This page reuses the same component as the mb payment details ensuring that users are familiar with the layout and can easily find the information they need. The primary objective of this page is to offer users comprehensive details about their pending MBWay payments, in scenarios where they might have closed the whitelabel app during the payment process. It helps clarify the payment status and guides users on completing their transactions successfully.

Info

Importantly, only the most recent pending order will be displayed to the user, focusing their attention on the latest transaction.

...

Backend

Create Payment Request

To create a payment request for MBWay, it is necessary to add a new endpoint called InitiatePayment that handles the initialization of a new payment. Unlike the GenerateCheckoutLink, which is used for other payment methods, in the case of MBWay, we will not generate a link. Instead, we will request Paycomet to create a payment request in the customer's MBWay account.

Info

The InitiatePayment endpoint was created specifically for this purpose: to request or initiate a payment that will be processed outside the whitelabel.

...

Expand
titlehttps://sequencediagram.org/ - Create Payment Request
Code Block
title Create Payment Request

participant Frontend
participant Graphql/Fulfillment
participant DB
participant Payment Service
participant PSP Service
participant Paycomet External

Frontend->Graphql/Fulfillment: Initiate Payment
Graphql/Fulfillment->Payment Service: Initiate Payment
Payment Service->PSP Service:Initiate Payment
PSP Service->Paycomet External:Payments Endpoint
PSP Service<-Paycomet External:Result
Payment Service<-PSP Service:Result
Graphql/Fulfillment<-Payment Service->DB: Update Order \n(PaymentRequestTimeLimit)
Payment Service<-DB: Order Updated
DB<-Payment Service: Create Payment in Payment Table
DB->Payment Service: Payment Created
Graphql/Fulfillment<-Payment Service:Result
Frontend<-Graphql/Fulfillment:Result

group Commit Order
Frontend->Frontend:Order Polling>Graphql/Fulfillment:     Commit Order\n(SaveCommitOnly)
Frontend<-DB:Graphql/Fulfillment: Commit Order Result
end

loop
Frontend->DB:Order Polling
Frontend<-DB:Order Result
end

For this communication, it is necessary to transmit two important pieces of information to the Paycomet service: the amount and the cellphone. The cellphone will be used by Paycomet to create a request in the user's MBWay account. Once the data reaches the Paycomet service, we will create a payload as mentioned below for the /payments endpoint of Paycomet.

...

Expand
titlehttps://sequencediagram.org/ - Retrieve Payment Status

title Payment Status

participant Frontend
participant Graphql/Fulfillment
participant DB
participant Payment Service
participant PSP Service
participant Paycomet External

Frontend->Frontend:Order Polling
PSP Service<-Paycomet External:Payment Status
Payment Service<-PSP Service:Payment Status
DB<-Payment Service: Update Order
Frontend<-DB:Order Result

Development

This section includes some code examples that will be developed. The examples serve as a guide for development, and good practices as well as testing should be adopted.

New payment method support

This first stage involves adding the main foundation for the new payment method. Since this task is repeated for all new payment methods, I will only provide the reference for each stage. This should be the first part of the frontend development; without it, it will not be possible to continue with the development of the subsequent screens.

...

Add new payment method

...

Create a new feature flag

https://rbictg.atlassian.net/wiki/spaces/IBC/pages/4362960979/Technical+refinement+-+Front+end#Task-1%3A-Create-a-new-feature-flag

ref:

Jira Legacy
serverSystem Jira
serverId255417eb-03fa-3e2f-a6ba-05d325fec50d
keyIBFEC-1758

time: 1h

...

icon

This task involves adding the icon to be used later by the whitelabel

Expand
titlesrc/svgs/mbway/index.tsx
Code Block
import { SVGIconComponent } from '../types';

export const endered: SVGIconComponent = ({ title = '', ...props }) => (
//svg code
);
Expand
titlesrc/svgs/index.ts
Code Block
export * from './mbway';
Expand
titlesrc/themes/common/icon.ts
Code Block
mbway: 'mbway',
Expand
titlesrc/themes/types/icon.ts
Code Block
mbway: string;

ref: https://github.com/rbilabs/ctg-components-library/pull/399

Create a new feature flag

This task aims to create the feature flag in both launchdarkly and whitelabel

https://rbictg.atlassian.net/wiki/spaces/IBC/pages/4362960979/Technical+refinement+-+Front+end#Task-2%3A1%3A-AddCreate-thea-new-payment-method-in-the-payment-state-and-structurefeature-flag

ref:

Jira Legacy
serverSystem Jira
serverId255417eb-03fa-3e2f-a6ba-05d325fec50d
keyIBFEC-17611758

time: 8h1h

Add the new payment method in the payment

...

state and structure

This task aims to create the mbway in payment state and structure

https://rbictg.atlassian.net/wiki/spaces/IBC/pages/4362960979/Technical+refinement+-+Front+end#Task-3%3A2%3A-Add-the-new-payment-method-in-the-payment-state-and-structure

ref:

Jira Legacy
serverSystem Jira
serverId255417eb-03fa-3e2f-a6ba-05d325fec50d
keyIBFEC-1761

time: 8h

Add the new method in payment-method structure and payment list

This task aims to add mbway to the payment dropdown

https://rbictg.atlassian.net/wiki/spaces/IBC/pages/4362960979/Technical+refinement+-+Front+end#Task-4%3A3%3A-CreateAdd-andthe-add-a-new-method-in-payment-method-option-structure

https://rbictg.atlassian.net/wiki/spaces/IBC/pages/4362960979/Technical+refinement+-+Front+end#Task-4%3A-5%3ACreate-Adjustand-add-accounta-paymentnew-method-listsin-topayment-dealmethod-with-option-structure

https://rbictg.atlassian.net/wiki/spaces/IBC/pages/4362960979/Technical+refinement+-+Front+end#Task-5%3A-Adjust--account-payment-method-lists-to-deal-with-the-new-method

ref:

Jira Legacy
serverSystem Jira
serverId255417eb-03fa-3e2f-a6ba-05d325fec50d
keyIBFEC-1760

...

Adjust the receipt email to show the correct message for the new payment method

This task aims to adjust the email to include mbway as a payment method

https://rbictg.atlassian.net/wiki/spaces/IBC/pages/4449861673/Technical+refinement+-+Frontend#Task-6%3A-Adjust-the-receipt-email-to-show-the-correct-message-for-the-new-payment-method

...

This task covers the order commit, where we will add a new field called paymentRequestCreatedAt paymentRequestTimeLimit, which will be responsible for recording when the payment request was generated. This field will be used in the future on the "Waiting for Payment" screen. It is important to remember that saveCommitOnly must be enabled for the order commit in the backend to be activated.

Expand
titleCommit Order
Code Block
commitInput = {
  ...commitInput,
  payment: {
    paymentRequestCreatedAtpaymentRequestTimeLimit: 1627383253213, //timestamp
    ...commitInput.paymemt
  }
}
Info

Even though we are just requesting a payment, we must place the order so that we can receive the transaction data in the psp-service notification endpoint. Without this, the order will never be completed.

Payment Pending Tracking

...

Tracking Page

This task involves handling the information for the "Waiting for Payment" screen when the payment request is made. Therefore, a generic screen should be developed that can be used by other future payment methods. Additionally, this screen should be displayed when the user closes the app and returns to the homepage, as long as there is still an active payment to be completed.

...

Expand
titlesrc/utils/routing/routes/routes.ts
Code Block
export const routes = {
  pendingPage: 'pendingPage'
}
Expand
titlesrc/components/layout/index.tsx
Code Block
const MBWayPaymentPage: LazyRoute = lazyWithFallback(() => import('pages/mbway'));

return(
  ...
      <Route
        noIndex
        path={`${routes.pendingPage}/:orderId`}
        element={<pendingPage />}
      />
  ...
)
Expand
titlesrc/pages/mbway/index.tsx
Code Block
const pendingPage = () => {
  const { orderId } = useParams();
  const MBWayPendingPayment = LocalStorage.getItem(StorageKeys.PENDING_PAYMENT);
  
  let data;
  if(MBWayPendingPayment && MBWayPendingPayment.id === orderId){
    data = MBWayPendingPayment;
  } else {
    try{
      const orders = GetUserOrders(); 
      // map the order list to show only the latest information needed
      data = orders[0];
    }
  }
  
  return (
    <MBWayComponent data={data} />
  )
}

Backend

Packages

Expand
titleintl-apis-psp-service
Code Block
export declare enum PaymentMethodType {
    ...
    MBWay = 'MBWay'
}
Expand
titleintl-payments
Code Block
export declare enum RBIPaymentType {
    ...
    MBWay = 'MBWay'
}

Commit Order Graphql/Fulfillment

Expand
titlesrc/functions/graphql/generated/graphql.ts
Code Block
export enum CartPaymentType {
  ...
  MBWay = 'MBWay',
}
Expand
titlesrc/functions/graphql/providers/payments.ts
Code Block
export interface IPaycometPaymentSaleEvent extends IBaseSale {
  ...
  paymentRequestCreatedAt?: number;
}
Expand
titlesrc/functions/graphql/providers/payments.ts
Code Block
paycometSale = {
  ...
  paymentRequestCreatedAt: payment.paymentRequestCreatedAt,
};
Expand
titlesrc/functions/graphql/utils/make-payment.ts
Code Block
private mapPaymentMethod(
    params: IPaycometPaymentSaleEvent,
  ): {
    paymentMethodType: string;
    paymentMethod: string;
  } {
    ...

    return {
      paymentMethodType: params.paymentRequestCreatedAt &&
                           params.paymentMethodType ? 'MBWay' : 'scheme',
      paymentMethod: JSON.stringify({
        type: 'scheme',
        subtype: 'onetime',
      }),
    };
  }
Expand
titleCommitOrder GraphQL
Code Block
//PaymentType = MBWay;
//PaymentMethodBrand = null;

CommitOrderInput
  Input.payment.mbway = {
    cellphone: string
    createdAt: number;
  }

Create a new request to Graphql/Fulfillment to handle MB Way on Initiate Endpoint

Implementation example: https://github.com/rbilabs/intl-whitelabel-graphql/pull/1150/files

Expand
titleUpdate the Graphql Initiate Endpoint
Code Block
input PaycometCaptureContextInput {
  amount: number!
  rbiOrderId: String!
  cellphone: number
  method: string!
}

input InitiatePaymentInput {
  storeId: String!
  paymentMethodType: String!
  cybersourcePaSetup: CybersourcePaSetupInput
  cybersourceCaptureContext: CybersourceCaptureContextInput
  paycometCaptureContext: PaycometCaptureContextInput
}

Create a new endpoint in Paycomet PSP Service

Expand
titlesrc/outcome/dtos/outcome.dto.ts
Code Block
export enum TypePayment {
  ...
  MBWay = 'MBWay'
}
Expand
titleInitiate Payment DTO
Code Block
export abstract class PspInitiateRequestDto {
  @AmountApiProperty()
  @IsOptional()
  @IsNumber()
  public amount: number;
  
  @RbiOrderIdApiProperty()
  @IsString()
  @IsNotEmpty()
  public rbiOrderId!: string;
  
  @IsOptional()
  @IsNumber()
  public cellphone: number;
  
  @IsString()
  @IsNotEmpty()
  public method!: string;
}
Expand
titleInitiate Payment Controller
Code Block
public initiatePayment(
    @Headers('region') region: string,
    @Body() pspInitiateRequestDto: PspInitiateRequestDto,
  ): Promise<ApiResult<unknown>> {
    if(pspInitiateRequestDto.method === TypePayment.MBWAY){
      return initiatePaymentMBWay(region, pspInitiateRequestDto);
    }
    return throw ApiErrorHttpException.createConflict(
        new ApiError(501, 'Initiate Payment request failed', 'initiatePayment'),
    );
  }
Expand
titleInitiate Payment Service
Code Block
public async initiatePaymentMBWay(
    region: string,
    request: InitiateRequestDto,
  ): Promise<InitiateResult> {
    try{
      const result = this.createPaymentMBWayRequest(request);
      // Add log about payment initiation attempt
      if(result.errorCode === TransactionStatus.SUCCESSFUL){
        return this.handleSuccesful(region, request, result);
      }
      return this.handleFailure(region, request, result);
    } catch(error){
      return this.handleFailure(region, request, error);
    }
}

Update the order to include the time left to finish the MB Way Payment

...

.

...

Expand
titlesrc/utils/routing/routes/routes.ts
Code Block
export const routes = {
  pendingPage: 'pendingPage'
}
Expand
titlesrc/components/layout/index.tsx
Code Block
const MBWayPaymentPage: LazyRoute = lazyWithFallback(() => import('pages/mbway'));

return(
  ...
      <Route
        noIndex
        path={`${routes.pendingPage}/:orderId`}
        element={<pendingPage />}
      />
  ...
)
Expand
titlesrc/pages/mbway/index.tsx
Code Block
const pendingPage = () => {
  const { orderId } = useParams();
  const MBWayPendingPayment = LocalStorage.getItem(StorageKeys.PENDING_PAYMENT);
  
  let data;
  if(MBWayPendingPayment && MBWayPendingPayment.id === orderId){
    data = MBWayPendingPayment;
  } else {
    try{
      const orders = GetUserOrders(); 
      // map the order list to show only the latest information needed
      data = orders[0];
    }
  }
  
  return (
    <MBWayComponent data={data} />
  )
}

Backend

Packages

This task aims to add mbway to the payment method enums

Expand
titleintl-apis-psp-service
Code Block
export declare enum PaymentMethodType {
    ...
    MBWay = 'MBWay'
}
Expand
titleintl-payments
Code Block
export declare enum RBIPaymentType {
    ...
    MBWay = 'MBWay'
}

Commit Order Graphql/Fulfillment

This task aims to add mbway to the payment method enums and modify the commit order to accept this new payment method, in addition to including the new field: paymentRequestTimeLimit

Expand
titlesrc/functions/graphql/generated/graphql.ts
Code Block
export enum CartPaymentType {
  ...
  MBWay = 'MBWay',
}
Expand
titlesrc/functions/graphql/providers/payments.ts
Code Block
export interface IPaycometPaymentSaleEvent extends IBaseSale {
  ...
  paymentRequestTimeLimit?: number;
}
Expand
titlesrc/functions/graphql/providers/payments.ts
Code Block
paycometSale = {
  ...
  paymentRequestTimeLimit: payment?.paymentRequestTimeLimit,
};
Expand
titlesrc/functions/graphql/utils/make-payment.ts
Code Block
private mapPaymentMethod(
    params: IPaycometPaymentSaleEvent,
  ): {
    paymentMethodType: string;
    paymentMethod: string;
  } {
    ...

    return {
      paymentMethodType: params.paymentRequestTimeLimit &&
                           params.paymentMethodType ? 'MBWay' : 'scheme',
      paymentMethod: JSON.stringify({
        type: 'scheme',
        subtype: 'onetime',
      }),
    };
  }
Expand
titleCommitOrder GraphQL
Code Block
//PaymentType = MBWay;
//PaymentMethodBrand = null;

CommitOrderInput
  Input.payment.mbway = {
    cellphone: string
    createdAt: number;
  }

Create a new request to Graphql/Fulfillment to handle MB Way on Initiate Endpoint

This task aims to add the paycometCaptureContext field to the initiatePayment endpoint

Expand
titleUpdate the Graphql Initiate Endpoint
Code Block
input PaycometCaptureContextInput {
  amount: number!
  rbiOrderId: String!
  cellphone: number
  method: string!
}

input InitiatePaymentInput {
  storeId: String!
  paymentMethodType: String!
  cybersourcePaSetup: CybersourcePaSetupInput
  cybersourceCaptureContext: CybersourceCaptureContextInput
  paycometCaptureContext: PaycometCaptureContextInput
}

Implementation example: https://github.com/rbilabs/intl-whitelabel-graphql/pull/1150

Create a new endpoint in Paycomet PSP Service

This task aims to create the initiatePayment endpoint on paycomet psp and also its functionality.

Expand
titlesrc/outcome/dtos/outcome.dto.ts
Code Block
export enum TypePayment {
  ...
  MBWay = 'MBWay'
}
Expand
titleInitiate Payment DTO
Code Block
export abstract class PspInitiateRequestDto {
  @AmountApiProperty()
  @IsOptional()
  @IsNumber()
  public amount: number;
  
  @RbiOrderIdApiProperty()
  @IsString()
  @IsNotEmpty()
  public rbiOrderId!: string;
  
  @IsOptional()
  @IsNumber()
  public cellphone: number;
  
  @IsString()
  @IsNotEmpty()
  public method!: string;
}
Expand
titleInitiate Payment Controller
Code Block
public initiatePayment(
    @Headers('region') region: string,
    @Body() pspInitiateRequestDto: PspInitiateRequestDto,
  ): Promise<ApiResult<unknown>> {
    if(pspInitiateRequestDto.method === TypePayment.MBWAY){
      return initiatePaymentMBWay(region, pspInitiateRequestDto);
    }
    return throw ApiErrorHttpException.createConflict(
        new ApiError(501, 'Initiate Payment request failed', 'initiatePayment'),
    );
  }
Expand
titleInitiate Payment Service
Code Block
public async initiatePaymentMBWay(
    region: string,
    request: InitiateRequestDto,
  ): Promise<InitiateResult> {
    try{
      const result = this.createPaymentMBWayRequest(request);
      // Add log about payment initiation attempt
      if(result.errorCode === TransactionStatus.SUCCESSFUL){
        return this.handleSuccesful(region, request, result);
      }
      return this.handleFailure(region, request, result);
    } catch(error){
      return this.handleFailure(region, request, error);
    }
}

Update the makePayment endpoint in Paycomet PSP Service

Expand
titlesrc/payment/payment.service.ts
Code Block
private isOneTimePayment(paymentMethod: PaymentMethod): paymentMethod is OneTimeSchemeDto {
return (
    (paymentMethod.type === PaymentMethodType.Scheme ||
    paymentMethod.type === PaymentMethodType.MBWay) &&
    paymentMethod.subtype === SchemePaymentMethodType.OneTime
  );
}
Expand
titlesrc/paycomet-core/paycomet-helper.ts
Code Block
public getPaymentLinkId(
  ...
): TypePayment | undefined {
  if (!methodId) {
    const paymentLink = transaction?.payment?.history.find(
      (order) =>
        ... ||
        order.methodId === TransactionMethodId.APPLEPAYLINK ||
        order.methodId === TransactionMethodId.MBWAY ||,
    );

    methodId = Number(paymentLink?.methodId);
  }
}
Expand
titlesrc/paycomet-core/commons.types.ts
Code Block
export enum TransactionMethodId {
  APPLEPAYLINK = 1,
  MBWAY = 38
}

Admin App

Adding mbway within the translation enum so that the Admin App knows this new payment method and selects the correct translation.

Expand
titlesrc/components/order-details/order-details-card.tsx

ref: https://github.com/rbilabs/intl-admin-app/blob/6068cb1f1023cb5a588bd3a87e7cc3587d226397/src/components/order-details/order-details-card.tsx#L60-L86

Code Block
const paymentMethodType = order?.cart?.payment?.type;

if (paymentMethodType === 'MBWay') {
      return formatMessage({ id: paymentMethodBrandTranslationMap(paymentMethodType) });
    }
    
if (paymentMethodBrand) {
      return formatMessage({ id: paymentMethodBrandTranslationMap(paymentMethodBrand) });
    }

DOP

Adding mbway within the translation enum so that the DOP knows this new payment method and selects the correct translation

Expand
titlesrc/utils/orders.ts

ref: https://github.com/rbilabs/ctg-fz-portal/blob/75b71352d4049a2797c8e752def79807d40a4e07/workspaces/frontend/src/utils/orders.ts#L8-L26

Code Block
export const paymentMethodTranslation: Record<string, keyof LocalizedDictionary> = {
  MBWAY: `${pathPaymentTranslations}.mbway`,
};

Expeditor Tablet

Adding the mbway inside the enum so that the expeditor tablet knows this new payment method.

Expand
titlesrc/constants/paymentMethod.ts

ref: https://github.com/rbilabs/intl-expeditor-tablet/blob/b02805ed57a3d13dd4bc83dbdeac190ad2d2a106/workspaces/frontend/src/constants/paymentMethod.ts#L3-L19

Code Block
export enum PaymentMethod {
  ...,
  MBWAY = "MBWAY",
}

...

Test Scenario

Steps

Screenshots

SCENARIO 1: The user makes a payment

  1. The user selects MB Way from the payment list.

  2. The user fills in the phone number field.

  3. The user is redirected to the "Waiting for Payment" screen.

  4. The user accepts the payment in the MB Way app.

  5. The user returns to the whitelabel app.

  6. The user is redirected to the order confirmation page.

https://www.figma.com/design/RtD0UFtwuwXx14lbLCAPlr/branch/OWwFfjThLHwiZkB2dvJKgv/9.-Checkout?node-id=40558-24217&t=OZuRKZNKCPJTSM5t-0

SCENARIO 2: The user makes a payment and closes the whitelabel app ( Delivery )

  1. The user selects MB Way from the payment list.

  2. The user fills in the phone number field.

  3. The user is redirected to the "Waiting for Payment" screen.

  4. The user closes the whitelabel app.

  5. The user accepts the payment in the MB Way app.

  6. The user returns to the whitelabel app.

  7. A tracking modal appears for the user to track the order.

https://www.figma.com/design/RtD0UFtwuwXx14lbLCAPlr/branch/OWwFfjThLHwiZkB2dvJKgv/9.-Checkout?node-id=42110-4286&t=OZuRKZNKCPJTSM5t-0

SCENARIO 3: The user makes a payment and closes the whitelabel app ( Pickup )

  1. The user selects MB Way from the payment list.

  2. The user fills in the phone number field.

  3. The user is redirected to the "Waiting for Payment" screen.

  4. The user closes the whitelabel app.

  5. The user accepts the payment in the MB Way app.

  6. The user returns to the whitelabel app.

https://www.figma.com/design/RtD0UFtwuwXx14lbLCAPlr/branch/OWwFfjThLHwiZkB2dvJKgv/9.-Checkout?node-id=42110-4287&t=OZuRKZNKCPJTSM5t-0

SCENARIO 4: The user makes a payment, closes the whitelabel app, doesn't pay in the MB Way app, opens the whitelabel app, the payment is still valid and user is redirect to waiting payment page.

  1. The user selects MB Way from the payment list.

  2. The user fills in the phone number field.

  3. The user is redirected to the "Waiting for Payment" screen.

  4. The user closes the whitelabel app.

  5. The user returns to the whitelabel app.

  6. The user is redirect to waiting payment page

https://www.figma.com/design/RtD0UFtwuwXx14lbLCAPlr/branch/OWwFfjThLHwiZkB2dvJKgv/9.-Checkout?node-id=42037-29391&t=G7781FC1ZSRNblsB-0

SCENARIO 6: The user enters an incorrect phone number

  1. The user selects MB Way from the payment list.

  2. The user fills in the phone number field with an incorrect number.

  3. An error modal appears.

https://www.figma.com/design/RtD0UFtwuwXx14lbLCAPlr/branch/OWwFfjThLHwiZkB2dvJKgv/9.-Checkout?node-id=42037-29246&t=OZuRKZNKCPJTSM5t-0

SCENARIO 7: The user makes a payment and the time limit expires

  1. The user selects MB Way from the payment list.

  2. The user fills in the phone number field.

  3. The user is redirected to the "Waiting for Payment" screen.

  4. The timer finishes, and an error modal appears.

https://www.figma.com/design/RtD0UFtwuwXx14lbLCAPlr/branch/OWwFfjThLHwiZkB2dvJKgv/9.-Checkout?node-id=42037-29247&t=OZuRKZNKCPJTSM5t-0

SCENARIO 8: The user makes a payment and cancels in the MB Way app

  1. The user selects MB Way from the payment list.

  2. The user fills in the phone number field.

  3. The user is redirected to the "Waiting for Payment" screen.

  4. The user cancels the payment in the MB Way app.

  5. An error modal appears.

https://www.figma.com/design/RtD0UFtwuwXx14lbLCAPlr/branch/OWwFfjThLHwiZkB2dvJKgv/9.-Checkout?node-id=42037-29247&t=OZuRKZNKCPJTSM5t-0

SCENARIO 9: Guest receives the email after placing the order

  1. The user selects MB Way from the payment list.

  2. The user fills in the phone number field.

  3. The user is redirected to the "Waiting for Payment" screen.

  4. The user accepts the payment in the MB Way app.

  5. The user returns to the white-label app.

  6. The user is redirected to the order confirmation page.

  7. The user receives an email informing them that the order has been placed.

image-20240119-170853.png

SCENARIO 10: The support tool user can see the order receipt

  1. The order is placed.

  2. The support user can see the order in the support tool.

  3. The support user selects the order.

  4. The support user can see the order details.

  5. The support user can see that the order is paid via the MB Way app.

SCENARIO 11: The DOP user can see the order receipt

  1. The order is placed.

  2. The user can see the order in the DOP.

  3. The user selects the order.

  4. The user can see the order details.

  5. The user can see that the order is paid via the MB Way app.

SCENARIO 12: The DMP user can see the order receipt

  1. The order is placed.

  2. The user can see the order in the DMP.

  3. The user selects the order.

  4. The user can see the order details.

  5. The user can see that the order is paid via the MB Way app.

SCENARIO 13: Make a refund in the support tool

  1. The order is placed.

  2. The support user can see the order in the support tool.

  3. The support user selects the order.

  4. The support user can see the order details.

  5. The support user can make a refund.

SCENARIO 14: Make a partial refund in the support tool

  1. The order is placed.

  2. The support user can see the order in the support tool.

  3. The support user selects the order.

  4. The support user can see the order details.

  5. The support user can make a partial refund.

SCENARIO 15: Make a refund in DMP

  1. The order is placed.

  2. The user can see the order in the DMP.

  3. The user selects the order.

  4. The user can see the order details.

  5. The user can make a refund.

SCENARIO 16: Autorefund

  1. The order is placed.

  2. The order is cancelled for any reason.

  3. The autorefund is triggered by the system.

  4. The support user can see the order in the support tool.

  5. The order is refunded

SCENARIO 17: Phone input error

  1. The user selects MB Way from the payment list.

  2. The user fills in the phone number field a wrong value.

  3. The user see a payment error modal

  4. The user continues in the payment page

Image Removed
  1. cannot click continue button.

Image Added

SCENARIO 18: Payment Refused

  1. The user selects MB Way from the payment list.

  2. The user fills in the phone number field.

  3. The user is redirected to the "Waiting for Payment" screen.

  4. The user refuse the payment in the MB Way app.

  5. The user see a payment refused modal

  6. The user is redirect to cart page

SCENARIO 19: Payment Refused by time expired

  1. The user selects MB Way from the payment list.

  2. The user fills in the phone number field a wrong value.

  3. The user is redirected to the "Waiting for Payment" screen.

  4. The user waits for time limit to end

  5. The user see a payment refused modal

  6. The user is redirect to cart page

SCENARIO 20: Insert a phone number without iso code country

  1. The user selects MB Way from the payment list.

  2. The user fills in the phone number field with only phonenumber (e.g., 983334571).

  3. The user is redirect to waiting payment page.

SCENARIO 21: Insert a phone number with iso code country

  1. The user selects MB Way from the payment list.

  2. The user fills in the phone number field with only phonenumber (e.g., 351 983334571).

  3. The user is redirect to waiting payment page.

...