Skip to content

Commit 9f72d7b

Browse files
amihajlovskizenit2001shanikantsingh
authored
Apple Pay on PDP (#1206)
* feat: enabling/disabling apple pay express on pdp config (#1140) * Render applepay btn on PDP (#1145) * fix: removed err in catch * feat: override detail page * fix: unit tests * chore: move files * fix: tests * fix: render button on initial render of the product * feat: enabling/disabling apple pay express on pdp config (#1140) * Render applepay btn on PDP (#1145) * fix: removed err in catch * feat: override detail page * fix: unit tests * chore: move files * fix: tests * fix: render button on initial render of the product * chore: consolidate metadata attributes * chore: remove system attributes * Create temporary basket for express pdp (#1183) * feat(SFI-876): applepay express pdp * chore(SFI-876): unit tests * chore(SFI-876): unit tests * feat(SFI-876): create temporary basket for express pdp * fix(SFI-876): handle temporary basket creation failure * fix: adding csrf validation to applePayExpressCommon.js and linting * chore: linting --------- Co-authored-by: Zenit Shkreli <69572953+zenit2001@users.noreply.github.com> * applepay unit tests (#1193) * feat(SFI-876): applepay express pdp * chore(SFI-876): unit tests * chore(SFI-876): unit tests * feat(SFI-876): create temporary basket for express pdp * fix(SFI-876): handle temporary basket creation failure * fix: lint * chore: fix lint errors * fix: lint * chore: added tests for onshipping contact callback --------- Co-authored-by: shani <shani.singh@adyen.com> * BM express config (#1197) * feat: update the UI for enabling express buttons * feat: make title bolder * feat: adapt adyen settings page for modern UI * fix: removed duplicate key * fix: linting * fix: line items --------- Co-authored-by: Zenit Shkreli <69572953+zenit2001@users.noreply.github.com> Co-authored-by: Shani <31096696+shanikantsingh@users.noreply.github.com> Co-authored-by: shani <shani.singh@adyen.com>
1 parent 8784810 commit 9f72d7b

36 files changed

Lines changed: 1997 additions & 516 deletions

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ module.exports = {
9595
"import/extensions": "off",
9696
"camelcase": "off",
9797
"no-bitwise": "off",
98-
"no-underscore-dangle": "off"
98+
"no-underscore-dangle": "off",
99+
'no-restricted-syntax': ['off', 'ForOfStatement'],
99100
},
100101
};

jest/sfccCartridgeMocks.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ jest.mock(
2020
{ virtual: true },
2121
);
2222

23+
jest.mock(
24+
'*/cartridge/adyen/scripts/expressPayments/createTemporaryBasket',
25+
() => jest.fn(),
26+
{ virtual: true },
27+
);
28+
2329
jest.mock(
2430
'*/cartridge/adyen/scripts/expressPayments/selectShippingMethods',
2531
() => jest.fn(),
@@ -467,4 +473,4 @@ jest.mock(
467473
getInstallmentValues: jest.fn(),
468474
}),
469475
{ virtual: true },
470-
);
476+
);

metadata/site_import/meta/system-objecttype-extensions.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -517,13 +517,6 @@
517517
<min-length>0</min-length>
518518
<field-length>0</field-length>
519519
</attribute-definition>
520-
<attribute-definition attribute-id="ExpressPayments_enabled">
521-
<display-name xml:lang="x-default">Enable express checkout</display-name>
522-
<type>boolean</type>
523-
<mandatory-flag>false</mandatory-flag>
524-
<externally-managed-flag>false</externally-managed-flag>
525-
<default-value>true</default-value>
526-
</attribute-definition>
527520
<attribute-definition attribute-id="ExpressPayments_order">
528521
<display-name xml:lang="x-default">Order of the express payment buttons</display-name>
529522
<description xml:lang="x-default">If you want to change the order go to the new config page (Adyen Settings)</description>
@@ -539,6 +532,13 @@
539532
<externally-managed-flag>false</externally-managed-flag>
540533
<default-value>true</default-value>
541534
</attribute-definition>
535+
<attribute-definition attribute-id="ApplePayExpress_Pdp_Enabled">
536+
<display-name xml:lang="x-default">Enable Apple Pay express on product detail page</display-name>
537+
<type>boolean</type>
538+
<mandatory-flag>false</mandatory-flag>
539+
<externally-managed-flag>false</externally-managed-flag>
540+
<default-value>true</default-value>
541+
</attribute-definition>
542542
<attribute-definition attribute-id="AmazonPayExpress_Enabled">
543543
<display-name xml:lang="x-default">Enable Amazon Pay express checkout</display-name>
544544
<type>boolean</type>
@@ -708,9 +708,9 @@
708708
<attribute attribute-id="AdyenGiving_charityUrl"/>
709709
<attribute attribute-id="AdyenGiving_backgroundUrl"/>
710710
<attribute attribute-id="AdyenGiving_logoUrl"/>
711-
<attribute attribute-id="ExpressPayments_enabled"/>
712711
<attribute attribute-id="ExpressPayments_order"/>
713712
<attribute attribute-id="ApplePayExpress_Enabled"/>
713+
<attribute attribute-id="ApplePayExpress_Pdp_Enabled"/>
714714
<attribute attribute-id="AmazonPayExpress_Enabled"/>
715715
<attribute attribute-id="PayPalExpress_Enabled"/>
716716
<attribute attribute-id="PayPalExpress_ReviewPage_Enabled"/>

0 commit comments

Comments
 (0)