Skip to content

Commit

Permalink
chore: merging develop into SFI-42 and adding required mocks (#1115)
Browse files Browse the repository at this point in the history
  • Loading branch information
zenit2001 committed Jul 4, 2024
1 parent 9da92d8 commit 6df3c65
Show file tree
Hide file tree
Showing 39 changed files with 17,920 additions and 23,017 deletions.
4 changes: 0 additions & 4 deletions documentation/Adyen SFCC Docs.md

This file was deleted.

39 changes: 39 additions & 0 deletions documentation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Adyen Salesforce Commerce Cloud Integration

Integrate Adyen with Salesforce Commerce Cloud using the Storefront Reference Architecture (SFRA). This method provides seamless access to Adyen's extensive payment features through the Adyen payments cartridge.
 

The documentation includes detailed diagrams to help you understand the integration process and enhance your e-commerce capabilities using Adyen's robust payment solutions.
 

For more details, visit the [Adyen Salesforce Commerce Cloud documentation](https://docs.adyen.com/plugins/salesforce-commerce-cloud/).

The below flow diagrams are applicable to this release.

## Get Payment Methods
![get-payment-methods.png](diagrams/get-payment-methods.png)
## Payment Without Action
Example payment methods, that are covered by this flow: Cards without 3DS, SEPA Direct Debit.
![payment-without-action.png](diagrams/payment-without-action.png)
## Payment With Action
Example payment methods, that are covered by this flow: 3DS2 Cards, Bancontact.
![payment-with-action.png](diagrams/payment-with-action.png)
## Payment From Component
Example payment methods, that are covered by this flow: PayPal, MBWay, Apple Pay, Amazon Pay etc.
![payment-from-component.png](diagrams/payment-from-component.png)
## Single Giftcard Flow
![single-giftcard-flow.png](diagrams/single-giftcard-flow.png)
## Multiple Giftcards Flow
![multiple-giftcards-flow.png](diagrams/multiple-giftcards-flow.png)
## Apple Pay Express
Example payment methods, that are covered by this flow: Apple Pay Express from Cart/mini-cart.
![apple-pay-express.png](diagrams/apple-pay-express.png)
## PayPal Express
Example payment methods, that are covered by this flow: PayPal Express from Cart/mini-cart.

## Amazon Pay Express
Example payment methods, that are covered by this flow: Amazon Pay Express from Cart/mini-cart.
![amazon-pay-express.png](diagrams/amazon-pay-express.png)

## Webhooks Flow
![webhooks-flow.png](diagrams/webhooks-flow.png)
Binary file added documentation/diagrams/amazon-pay-express.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/diagrams/apple-pay-express.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/diagrams/get-payment-methods.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/diagrams/payment-with-action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/diagrams/single-giftcard-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/diagrams/webhooks-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions jest/__mocks__/dw/crypto/Encoding.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const Encoding = jest.fn();
1 change: 1 addition & 0 deletions jest/__mocks__/dw/crypto/MessageDigest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const MessageDigest = jest.fn();
1 change: 1 addition & 0 deletions jest/__mocks__/dw/order/ShippingLocation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const ShippingLocation = jest.fn();
2 changes: 2 additions & 0 deletions jest/__mocks__/dw/order/TaxMgr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const getTaxJurisdictionID = jest.fn();
export const getTaxRate = jest.fn();
1 change: 1 addition & 0 deletions jest/__mocks__/dw/svc/LocalServiceRegistry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const createService = jest.fn();
1 change: 1 addition & 0 deletions jest/__mocks__/dw/util/Bytes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const Bytes = jest.fn();
1 change: 1 addition & 0 deletions jest/__mocks__/dw/util/Currency.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const getCurrency = jest.fn();
2 changes: 2 additions & 0 deletions jest/sfccCartridgeMocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jest.mock('*/cartridge/models/cart', () => jest.fn(), { virtual: true });

jest.mock('*/cartridge/models/account', () => jest.fn(), { virtual: true });

jest.mock('*/cartridge/models/shipping/shippingMethod', () => jest.fn(), { virtual: true });

jest.mock(
'*/cartridge/scripts/checkout/shippingHelpers',
() => ({
Expand Down
6 changes: 6 additions & 0 deletions jest/sfccPathSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ jest.mock(
{ virtual: true },
);

jest.mock(
'*/cartridge/models/shipping/shippingMethod',
() => require('../cartridge/models/shipping/shippingMethod'),
{ virtual: true },
);

jest.mock(
'*/cartridge/adyen/scripts/partialPayments/partialPaymentsOrder',
() =>
Expand Down
Loading

0 comments on commit 6df3c65

Please sign in to comment.