-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/optimise-capture-charge-calls
- Loading branch information
Showing
36 changed files
with
757 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: add | ||
|
||
Add the feature flag check for pay-for-order flow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: add | ||
Comment: Behind feature flag: Show dispute resolution footer for inquiries under review or closed. | ||
|
||
|
4 changes: 4 additions & 0 deletions
4
changelog/fix-7241-update-live-dispute-docs-links-in-transaction-detail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Comment: Behind a feature flag: Update documentation links (new/changed docs content) when notifying merchant that a dispute needs response. |
4 changes: 4 additions & 0 deletions
4
changelog/fix-fix-bundles-on-product-woopay-express-checkout-button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Fix WooPay express checkout button with product bundles on product page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Fix init WooPay and empty cart error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
WooPay save my info phone number fallback for virtual products |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Prevent WooPay multiple redirect requests. |
4 changes: 4 additions & 0 deletions
4
changelog/update-6569-customize-success-banner-message-account-status
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: update | ||
|
||
Adapt the PO congratulations card copy for pending account status. |
5 changes: 5 additions & 0 deletions
5
changelog/update-7124-transaction-details-dispute-amount-currency
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: update | ||
Comment: Behind feature flag: show transaction details dispute amount in store's currency | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,9 @@ import request from 'wcpay/checkout/utils/request'; | |
import { buildAjaxURL } from 'wcpay/payment-request/utils'; | ||
import { getConfig } from 'wcpay/utils/checkout'; | ||
|
||
jest.mock( 'wcpay/checkout/utils/request', () => jest.fn() ); | ||
jest.mock( 'wcpay/checkout/utils/request', () => | ||
jest.fn( () => Promise.resolve( {} ).finally( () => {} ) ) | ||
); | ||
jest.mock( 'wcpay/payment-request/utils', () => ( { | ||
buildAjaxURL: jest.fn(), | ||
} ) ); | ||
|
@@ -15,17 +17,49 @@ jest.mock( 'wcpay/utils/checkout', () => ( { | |
} ) ); | ||
|
||
describe( 'WCPayAPI', () => { | ||
test( 'initializes woopay using config params', () => { | ||
test( 'does not initialize woopay if already requesting', async () => { | ||
buildAjaxURL.mockReturnValue( 'https://example.org/' ); | ||
getConfig.mockReturnValue( 'foo' ); | ||
getConfig.mockImplementation( ( key ) => { | ||
const mockProperties = { | ||
initWooPayNonce: 'foo', | ||
order_id: 1, | ||
key: 'testkey', | ||
billing_email: '[email protected]', | ||
}; | ||
return mockProperties[ key ]; | ||
} ); | ||
|
||
const api = new WCPayAPI( {}, request ); | ||
api.isWooPayRequesting = true; | ||
await api.initWooPay( '[email protected]', 'qwerty123' ); | ||
|
||
expect( request ).not.toHaveBeenCalled(); | ||
expect( api.isWooPayRequesting ).toBe( true ); | ||
} ); | ||
|
||
test( 'initializes woopay using config params', async () => { | ||
buildAjaxURL.mockReturnValue( 'https://example.org/' ); | ||
getConfig.mockImplementation( ( key ) => { | ||
const mockProperties = { | ||
initWooPayNonce: 'foo', | ||
order_id: 1, | ||
key: 'testkey', | ||
billing_email: '[email protected]', | ||
}; | ||
return mockProperties[ key ]; | ||
} ); | ||
|
||
const api = new WCPayAPI( {}, request ); | ||
api.initWooPay( '[email protected]', 'qwerty123' ); | ||
await api.initWooPay( '[email protected]', 'qwerty123' ); | ||
|
||
expect( request ).toHaveBeenLastCalledWith( 'https://example.org/', { | ||
_wpnonce: 'foo', | ||
email: '[email protected]', | ||
user_session: 'qwerty123', | ||
order_id: 1, | ||
key: 'testkey', | ||
billing_email: '[email protected]', | ||
} ); | ||
expect( api.isWooPayRequesting ).toBe( false ); | ||
} ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.