Tech Discovery - Ticket Restaurant
- 1 Development
- 1.1 Feature Flags
- 1.2 Code Changes
- 1.2.1 PaymentMethodBrand
- 1.2.2 Frontend
- 1.2.2.1 Development
- 1.2.2.2 Unit Tests
- 1.2.3 Graphql
- 1.2.4 Fulfillment
- 1.2.5 Packages
- 1.2.6 DMP
- 1.2.7 DOP
- 1.2.8 Admin App
- 1.2.9 Driver-app ( Voucher )
- 1.3 Tests
- 1.3.1 Scenarios
- 1.3.2 Ticket Restaurant Card
- 1.3.3 Ticket Restaurant Voucher
- 1.3.4 Payment Methods
- 1.4 Possible Issues
Development
Feature Flags
Feature Flag | Description |
---|---|
enable-ticket-restaurant-credit-card-paycomet | This flag will be responsible for activating ticket restaurant payment method using the online payment |
enable-ticket-restaurant-voucher-paycomet | This flag will be responsible for activating ticket restaurant payment method using the voucher in person |
Code Changes
Not all unit tests that will be performed have been added, but it is implicit that it should cover as many tests as possible for this feature
PaymentMethodBrand
The essential part of this feature is the addition of new values for ticket restaurant to the paymentMethodBrand property, which will be responsible for identifying the payment method made and passing it on to all systems listed below, since the system used behind the scenes is payment via credit card.
ENUM | VALUE |
---|---|
TICKET_RESTAURANT_CARD | TICKET_RESTAURANT_CARD |
TICKET_RESTAURANT_VOUCHER | TICKET_RESTAURANT_VOUCHER |
Frontend
Development
It is necessary to ensure that the bumps were made to the frontend so that it is possible to find the restaurant ticket values.
Unit Tests
Update other unit tests to cover these changes.
Graphql
https://github.com/rbilabs/intl-whitelabel-graphql/pull/952
Fulfillment
https://github.com/rbilabs/intl-fulfillment-service/pull/813
Packages
https://rbictg.atlassian.net/wiki/spaces/IBC/pages/4590338104
https://github.com/rbilabs/intl-packages/pull/1187
DMP
https://github.com/rbilabs/intl-expeditor-tablet/pull/742
DOP
https://github.com/rbilabs/ctg-fz-portal/pull/2799
Admin App
https://github.com/rbilabs/intl-admin-app/pull/403
Driver-app ( Voucher )
https://github.com/rbilabs/intl-driver-app/pull/286
Tests
Scenarios
Scenarios | Description | PaymentMethod | PaymentMethodBrand |
---|---|---|---|
The user wants to make a purchase via restaurant ticket | It should display the payment option via ticket restaurant and when clicked, a jet iframe for credit card appears. |
CREDIT |
TICKET_RESTAURANT_CARD |
The user wants to make a purchase via restaurant ticket voucher | It should display the payment option via ticket restaurant voucher and when clicked, only a pay button will appear |
CASH |
TICKET_RESTAURANT_VOUCHER |
The user select restaurant ticket and change the payment method | It should be possible to change the payment method when restaurant ticket is selected |
CREDIT |
TICKET_RESTAURANT_CARD |
The user select restaurant ticket and change the payment method | It should be possible to change the payment method when restaurant ticket is selected |
CASH |
TICKET_RESTAURANT_VOUCHER |
If the user purchases via restaurant ticket voucher, the payment method must be displayed in the Driver-app. | It should be possible to see which paymentMethodBrand was chosen in the Driver-app. |
CASH |
TICKET_RESTAURANT_VOUCHER |
If the user purchases via restaurant ticket, the payment method must be displayed in the DMP. | It should be possible to see which paymentMethodBrand was chosen in the DMP. |
CREDIT or CASH | TICKET_RESTAURANT_CARD or TICKET_RESTAURANT_VOUCHER |
If the user purchases via restaurant ticket, the payment method must be displayed in the DOP. | It should be possible to see which paymentMethodBrand was chosen in the DOP. |
CREDIT or CASH | TICKET_RESTAURANT_CARD or TICKET_RESTAURANT_VOUCHER |
If the user purchases via restaurant ticket, the payment method must be displayed in the ADMIN APP. | It should be possible to see which paymentMethodBrand was chosen in the ADMIN APP. |
CREDIT or CASH | TICKET_RESTAURANT_CARD or TICKET_RESTAURANT_VOUCHER |
Ticket Restaurant Card
To make payments with the Ticket Restaurant card, we can use the same cards used for credit card payments. This integration with meal voucher cards is activated at restaurant points, together with Paycomet. We just need to validate that the credit card field is displayed to the user and that they can follow the same credit card payment flow and the paymentMethodBrand is filled with “TICKET_RESTAURANT_CARD”.
Ticket Restaurant Voucher
To make payments with the Ticket Restaurante Voucher, it is necessary to ensure that the process follows the CASH flow and the paymentMethodBrand is filled with “TICKET_RESTAURANT_VOUCHER”, where payment only occurs when the order is delivered to the customer and is made in person.
Payment Methods
It should be possible to select the restaurant card ticket as the main option to be chosen when the user enters the payment screen. You must be aware that the ticket restaurant card is not to be displayed in this list, only the voucher.
Possible Issues
Ticket Restaurant not accepted in payment request via paycomet
It may occur that a restaurant has payment failure when a payment request is registered via Ticket Restaurant. This problem may be related to the terminal IDs at the restaurant, which must be configured correctly to enable payment via restaurant ticket.