|
...
|
Problems
#1 Waylet configuration by store
Status | ||||
---|---|---|---|---|
|
Looking in sandbox configuration, it seems each account has his own set of commerceId, secret and apiKey.
We need to check if this proceeds and how we’ll handle on our side in case we need to store this data by restaurant in our platform.
This ticket was created to track this:
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
Solution
From Paycomet side we discovered that only the terminal ID is necessary, using terminal ID they can get the keys, secrets and commerceId.
cc Raphael Ferreira Gomes Ruani, Andrea
Repositories on this feature
...
Packages: https://github.com/rbilabs/intl-packages
Fulfillment: https://github.com/rbilabs/intl-fulfillment-service
PSP Paycomet Service:https://github.com/rbilabs/intl-psp-paycomet-service
Whitelabel Graphql: https://github.com/rbilabs/intl-whitelabel-graphql
...
Similar to Paypal and Bizum, Waylet has his own interface, provided by Paycomet, which should be instantiated per request of checkout link.
Waylet should be identified on Admin/Support Tool
Breakdown
The tasks are almost the same as we done implementing Bizum. Here a copy of the steps just in case the original page get archived.
Add Waylet into packages (original source)
Repo: intl-packages
Waylet must be added inCartGooglePaymentTypeExclusion
,XenialDeliveryPayTypeId
andRBIPaymentCard
, then run the yarn build command.
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Pro tip: when making any modifications to the package, the other repositories only receive these new modifications after running Bumps. |
Add to Loyalty (original source)
Repo: intl-loyalty
In the "loyalty-middleware" folder, update the packages
...
Add to PSP Service
...
Add to graphQL
Sequence Diagram
Info |
---|
Work in progress, troubles with Paycomet API to validate some flows. |
...
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
Add to Fulfillment (original source)
Repo: intl-fulfillment-service
Update Packages
Define Waylet in CARD_TYPE_TO_MDW, this file.
Define Waylet in MAP_GQL_CART_PAYMENT_TO_COMMON, this file.
Define Waylet in MAP_GQL_CART_PAYMENT_TO_RBI_COMMON, this file.
Add to Paycomet Payment Service (original source)
Taking advantage of Bizum refactor to accomodate both Bizum and Paypal, we just need to add the Waylet ENUM in the payment-core/common.types.ts, like here.
Add Waylet into payment-core/paycomet-helper.ts, like here.
And add it in the outcome validations, take a look at outcome folder..
Sequence Diagram
...
Code Block |
---|
title Paycomet Waylet Payment (Delivery) Frontend->GraphQL:generateCheckoutLink()\n<< methodId: 41 >> GraphQL->GraphQL:get Order and Store info GraphQL->Paycomet-PSP-Service:POST {pspServiceBaseURL}api/v1/links/checkout\n << To generate HPP URL >> Paycomet-PSP-Service->Paycomet(External):POST {paycometBaseURL}/v1/payments Paycomet-PSP-Service<-Paycomet(External):Return Waylet link Paycomet-PSP-Service->GraphQL:Return sanitized Hosted Page URL GraphQL->Frontend:Return Hosted Page URL Frontend->Frontend>Paycomet(External):Render Hosted Page Frontend-->Paycomet(External):Submit Waylet Validation\n<< After guest interaction with Hosted Page >> Paycomet(External)-->Paycomet-PSP-Service: Callback URL OK/NOK Paycomet-PSP-Service->Frontend:Return Payment Outcome Frontend->GraphQL:commitOrder() mutation\n<< Backend commit disabled >> GraphQL->Paycomet-PSP-Service:POST {pspServiceBaseURL}api/v1/payment note over Frontend,Paycomet(External):Work in progress continue here validateSale() Paycomet-PSP-Service-->GraphQL: Sale OK/NOK GraphQL->GraphQL: Hydrate Order and Update Order status GraphQL->Frontend: Order Ok, confirmation page. |