Versions Compared

Key

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

...

Packages: https://github.com/rbilabs/intl-packages

PSP Paycomet ServiceLoyalty: https://github.com/rbilabs/intl-psp-paycomet-servicePayment Serviceloyalty

Fulfillment: https://github.com/rbilabs/intl-paymentfulfillment-serviceLoyalty

PSP Paycomet Service:https://github.com/rbilabs/intl-loyaltypsp-paycomet-service

Whitelabel Graphql: https://github.com/rbilabs/intl-whitelabel-graphql

Whitelabel App: https://github.com/rbilabs/intl-whitelabel-app

Figma: Schroer, Gabriel (Deactivated)

Table of Contents

Sequence Diagram

Lucidchart
documentId
pageCount1
autoUpdatefalse
alignleft
typerichalignleft
autoSize1
macroId212c18aa-82a2-44ac-8050-f390618c5f25
pagesinstanceId920ae5b1-83d6-3e36-b794-1710780f64f3
pages
width700
68c0744f-0f16-45a8-98dc-41f5610b0e39documentTokenv2_553b49157110c9a058af38fe91f599cb1b5e1258ab98da315d6f1ca4a1227d7e-a=133831322&c=920ae5b1-83d6-3e36-b794-1710780f64f3&d=68c0744f-0f16-45a8-98dc-41f5610b0e39&p=4447830094
documentId68c0744f-0f16-45a8-98dc-41f5610b0e39
updated1705609545171
height500

...

Business rules

  • A new Bizum payment must be created for Paycomet. (https://docs.paycomet.com/en/recursos/espec/bizum )

  • This payment must work the same as Paycomet's PayPal, it must generate a link and be used in an Iframe where the payment will be processed.

  • The confirmation/tracking page should show the correct text in the payment reminder for this new payment method

  • The receipt email should show the correct payment option for this new payment method

  • The new method should be available in the user account methods list

  • We have to pay attention to changes from the Payments team, they are making some changes to their routine, and this new implementation cannot change the current behavior.

    There are two flags that change the application's behavior: enable-paycomet-webhook-notifications (BE) and enable-backend-commit-order (BE & FE), we must test both ways, with the flags enabled and disabled.

...

Tasks breakdown

Task 1:

...

Flag should be added in: src/utils/launchdarkly/flags.ts

Suggestion name: enable-bizum-paycomet

This flag is used to show Bizum payment in payment lists.

Example of use: frontend/src/state/payment/hooks/use-payment.tsx

Task 2: Add Bizum payment to packages

...

Add Bizum payment to packages

Repo: intl-packages

POC: https://github.com/rbilabs/intl-packages/pull/1024/files

Bizum payment must be added in CartGooglePaymentTypeExclusion, XenialDeliveryPayTypeId and RBIPaymentCard.

After adding this, run the yarn build command.
Reminder: when making any modifications to the package, the other repositories only receive these new modifications after running Bumps.

*Consider only changes to ENUM and Types in POC

Task 2: Update Loyalty

Repo: intl-loyalty

  • In the "loyalty-middleware" folder, update the packages

  • Bump the new version of @rbilabs/intl-payments in intl-loyalty/loyalty-middleware

  • Build the loyalty middleware: yarn install && yarn build

  • Generate the loyalty middleware sdk: yarn sdk:generate . This creates loyalty middleware SDK with MdwRBIPaymentCard

  • Then, finally, in WL-GQL you can load this latest version of intl-loyalty-middleware-sdk

...

PR Reference: https://github.com/rbilabs/intl-

...

loyalty/pull/

...

*Consider only changes to ENUM and Types in POC

...

426/

Task 3: Fulfillment

Repo: intl-fulfillment-service

  • Update Packages

  • Define Bizum in CARD_TYPE_TO_MDW

    image-20240119-112137.pngImage Added

  • Define Bizum in MAP_GQL_CART_PAYMENT_TO_COMMON

    image-20240119-112240.pngImage Added

  • Define Bizum in MAP_GQL_CART_PAYMENT_TO_RBI_COMMON

    image-20240119-112335.pngImage Added

Task 4: Added Bizum payment to Paycomet

Repo: intl-psp-paycomet-service

POC: https://github.dev/rbilabs/intl-psp-paycomet-service/pull/229/

Today, the PSP only works with PayPal, but refactoring is needed so that payment with a link works for PayPal and Bizum.

...

My suggestion is to refactor all files and code related to PayPal, and make it modular, with a name suggestive of payment with Link.

Example:

...

In the POC below, I left this ready, but validation from the team is necessary.POC: https://github.dev/rbilabs/intl-psp-paycomet-service/pull/229/

If necessary for necessary created creating a separate task separate:

  • Links

    • Add BIZUM in TypePayment and define Controller DTO.

    • Refactor to remover PayPal and add Link (Pay with Link).

    • Generate Link to PayPal or Bizum.

  • Outcome

    • Add BIZUM in TypePayment and define Controller DTO.

    • Refactor to remover PayPal and add Link (Pay with Link).

  • Payment Core

    • Add TransactionMethodId to Bizum with code 11

      image-20240118-200459.png

    • Change function to identify payment with PayPal to identify payment with Link.

      image-20240118-200654.png

  • Payment

    • Change confirm payment function to works all payments with link and not only Paypal: this.confirmPaymentPaypal => this.confirmPaymentLink

Task 5: Added Bizum payment to GraphQL.

Repo: intl-whitelabel-graphql

POC: https://github.com/rbilabs/intl-whitelabel-graphql/pull/752

  • It’s necessary to add BIZUM in CartPaymentCardType (order.gql) and generate GraphQL.

    • Run yarn update-packages

    • Add Bizum

      image-20240119-112052.pngImage Added

    • Run yarn graphql:types

  • Define Bizum in CARD_TYPE_TO_MDW

    image-20240119-112137.pngImage Added

  • Define Bizum in MAP_GQL_CART_PAYMENT_TO_COMMON

    image-20240119-112240.pngImage Added

  • Define Bizum in MAP_GQL_CART_PAYMENT_TO_RBI_COMMON

    image-20240119-112335.pngImage Added

  • Now run command:

    • yarn build