Skip to content

Commit

Permalink
Merge pull request #578 from commercelayer/fix/apple-pay
Browse files Browse the repository at this point in the history
Apple Pay Payment Processing Issue
  • Loading branch information
acasazza authored Sep 4, 2024
2 parents a7c1bb3 + 0fbd682 commit 63da749
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useNx": false,
"npmClient": "pnpm",
"version": "4.15.9",
"version": "4.15.10-beta.0",
"command": {
"version": {
"preid": "beta"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A collection of reusable React components that makes it super fast and simple to

# Getting started

For a constantly updated list of the available and soon-to-come micro frontends provided by Commerce Layer's react componente, please refer to [this interactive documentation](https://commercelayer.github.io/commercelayer-react-components/?path=/docs/getting-started-introdution--docs) that will provide you with all the necessary information about the involved web components and help you get started in a snap.
For a constantly updated list of the available and soon-to-come micro frontends provided by Commerce Layer's react componente, please refer to [this interactive documentation](https://commercelayer.github.io/commercelayer-react-components) that will provide you with all the necessary information about the involved web components and help you get started in a snap.

## Installation

Expand Down
4 changes: 2 additions & 2 deletions packages/react-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@commercelayer/react-components",
"version": "4.15.9",
"version": "4.15.10-beta.0",
"description": "The Official Commerce Layer React Components",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
Expand Down Expand Up @@ -224,4 +224,4 @@
"peerDependencies": {
"react": ">=18.0.0"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,10 @@ export function AdyenPayment({
'Payment methods are not available. Please, check your Adyen configuration.'
)
}
// @ts-expect-error no type
const showStoredPaymentMethods = paymentSource?.payment_methods?.storedPaymentMethods != null ?? false
const showStoredPaymentMethods =
// @ts-expect-error no type
paymentSource?.payment_methods?.storedPaymentMethods != null ?? false

const options = {
locale: order?.language_code ?? locale,
environment,
Expand Down Expand Up @@ -410,6 +412,7 @@ export function AdyenPayment({
const component = adyenCheckout
.create(type, {
showRemovePaymentMethodButton: showStoredPaymentMethods,
instantPaymentTypes: ['applepay', 'googlepay'],
onSelect: (component) => {
const id: string = component._id
if (id.search('scheme') === -1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ export interface BraintreeConfig {
inputWrapperClassName?: string
fields?: BraintreeHostedFields<HostedFieldFieldOptions>
styles?: Record<string, Record<string, string>>
/**
* Force challenge request for 3D Secure authentication. Default is true.
*/
challengeRequested?: boolean
}

interface Props {
Expand Down Expand Up @@ -218,7 +222,10 @@ export function BraintreePayment({
const hostedFields = require('braintree-web/hosted-fields')
const threeDSecure = require('braintree-web/three-d-secure')
braintreeClient.create(
{ authorization },
{
authorization,
challengeRequested: config?.challengeRequested ?? true
},
(clientErr: any, clientInstance: any) => {
if (clientErr) {
console.error(clientErr)
Expand Down

0 comments on commit 63da749

Please sign in to comment.