mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 14:57:26 +08:00
Fix merge conflict
This commit is contained in:
commit
460df5829f
4 changed files with 21 additions and 21 deletions
|
@ -200,12 +200,12 @@ return array(
|
|||
return $ppcp_tab ? $ppcp_tab : $section;
|
||||
},
|
||||
|
||||
'wcgateway.settings' => static function ( ContainerInterface $container ): Settings {
|
||||
return new Settings(
|
||||
$container->get( 'wcgateway.button.default-locations' ),
|
||||
$container->get( 'wcgateway.settings.dcc-gateway-title.default' )
|
||||
);
|
||||
},
|
||||
'wcgateway.settings' => SingletonDecorator::make(
|
||||
static function ( ContainerInterface $container ): Settings {
|
||||
$default_button_locations = $container->get( 'wcgateway.button.default-locations' );
|
||||
return new Settings( $default_button_locations );
|
||||
}
|
||||
),
|
||||
'wcgateway.notice.connect' => static function ( ContainerInterface $container ): ConnectAdminNotice {
|
||||
$state = $container->get( 'onboarding.state' );
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
|
|
|
@ -40,8 +40,8 @@ class ModularTestCase extends TestCase
|
|||
$wpdb->posts = '';
|
||||
$wpdb->postmeta = '';
|
||||
|
||||
!defined('PAYPAL_API_URL') && define('PAYPAL_API_URL', 'https://api.paypal.com');
|
||||
!defined('PAYPAL_SANDBOX_API_URL') && define('PAYPAL_SANDBOX_API_URL', 'https://api.sandbox.paypal.com');
|
||||
!defined('PAYPAL_API_URL') && define('PAYPAL_API_URL', 'https://api-m.paypal.com');
|
||||
!defined('PAYPAL_SANDBOX_API_URL') && define('PAYPAL_SANDBOX_API_URL', 'https://api-m.sandbox.paypal.com');
|
||||
!defined('PAYPAL_INTEGRATION_DATE') && define('PAYPAL_INTEGRATION_DATE', '2020-10-15');
|
||||
|
||||
!defined('PPCP_FLAG_SUBSCRIPTION') && define('PPCP_FLAG_SUBSCRIPTION', true);
|
||||
|
|
|
@ -57,7 +57,7 @@ test.describe.serial('Subscriptions Merchant', () => {
|
|||
const message = await page.locator('.notice-success');
|
||||
await expect(message).toContainText('Product published.');
|
||||
|
||||
const products = await request.get('https://api.sandbox.paypal.com/v1/catalogs/products?page_size=100&page=1&total_required=true', {
|
||||
const products = await request.get('https://api-m.sandbox.paypal.com/v1/catalogs/products?page_size=100&page=1&total_required=true', {
|
||||
headers: {
|
||||
'Authorization': AUTHORIZATION,
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -73,7 +73,7 @@ test.describe.serial('Subscriptions Merchant', () => {
|
|||
|
||||
product_id = product.id;
|
||||
|
||||
const plans = await request.get(`https://api.sandbox.paypal.com/v1/billing/plans?product_id=${product_id}&page_size=10&page=1&total_required=true`, {
|
||||
const plans = await request.get(`https://api-m.sandbox.paypal.com/v1/billing/plans?product_id=${product_id}&page_size=10&page=1&total_required=true`, {
|
||||
headers: {
|
||||
'Authorization': AUTHORIZATION,
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -107,7 +107,7 @@ test.describe.serial('Subscriptions Merchant', () => {
|
|||
const message = await page.locator('.notice-success');
|
||||
await expect(message).toContainText('Product updated.');
|
||||
|
||||
const products = await request.get('https://api.sandbox.paypal.com/v1/catalogs/products?page_size=100&page=1&total_required=true', {
|
||||
const products = await request.get('https://api-m.sandbox.paypal.com/v1/catalogs/products?page_size=100&page=1&total_required=true', {
|
||||
headers: {
|
||||
'Authorization': AUTHORIZATION,
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -121,7 +121,7 @@ test.describe.serial('Subscriptions Merchant', () => {
|
|||
});
|
||||
await expect(product.id).toBeTruthy;
|
||||
|
||||
const plan = await request.get(`https://api.sandbox.paypal.com/v1/billing/plans/${plan_id}`, {
|
||||
const plan = await request.get(`https://api-m.sandbox.paypal.com/v1/billing/plans/${plan_id}`, {
|
||||
headers: {
|
||||
'Authorization': AUTHORIZATION,
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -156,7 +156,7 @@ test('Create new free trial subscription product', async ({page, request}) => {
|
|||
const message = await page.locator('.notice-success');
|
||||
await expect(message).toContainText('Product published.');
|
||||
|
||||
const products = await request.get('https://api.sandbox.paypal.com/v1/catalogs/products?page_size=100&page=1&total_required=true', {
|
||||
const products = await request.get('https://api-m.sandbox.paypal.com/v1/catalogs/products?page_size=100&page=1&total_required=true', {
|
||||
headers: {
|
||||
'Authorization': AUTHORIZATION,
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -170,7 +170,7 @@ test('Create new free trial subscription product', async ({page, request}) => {
|
|||
});
|
||||
await expect(product.id).toBeTruthy;
|
||||
|
||||
const plans = await request.get(`https://api.sandbox.paypal.com/v1/billing/plans?product_id=${product.id}&page_size=10&page=1&total_required=true`, {
|
||||
const plans = await request.get(`https://api-m.sandbox.paypal.com/v1/billing/plans?product_id=${product.id}&page_size=10&page=1&total_required=true`, {
|
||||
headers: {
|
||||
'Authorization': AUTHORIZATION,
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -184,7 +184,7 @@ test('Create new free trial subscription product', async ({page, request}) => {
|
|||
});
|
||||
await expect(plan.id).toBeTruthy;
|
||||
|
||||
const planDetail = await request.get(`https://api.sandbox.paypal.com/v1/billing/plans/${plan.id}`, {
|
||||
const planDetail = await request.get(`https://api-m.sandbox.paypal.com/v1/billing/plans/${plan.id}`, {
|
||||
headers: {
|
||||
'Authorization': AUTHORIZATION,
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -253,7 +253,7 @@ test.describe('Subscriber my account actions', () => {
|
|||
await page.locator('text=View').first().click();
|
||||
|
||||
const subscriptionId = await page.locator('#ppcp-subscription-id').textContent();
|
||||
let subscription = await request.get(`https://api.sandbox.paypal.com/v1/billing/subscriptions/${subscriptionId}`, {
|
||||
let subscription = await request.get(`https://api-m.sandbox.paypal.com/v1/billing/subscriptions/${subscriptionId}`, {
|
||||
headers: {
|
||||
'Authorization': AUTHORIZATION,
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -267,7 +267,7 @@ test.describe('Subscriber my account actions', () => {
|
|||
const title = page.locator('.woocommerce-message');
|
||||
await expect(title).toHaveText('Your subscription has been cancelled.');
|
||||
|
||||
subscription = await request.get(`https://api.sandbox.paypal.com/v1/billing/subscriptions/${subscriptionId}`, {
|
||||
subscription = await request.get(`https://api-m.sandbox.paypal.com/v1/billing/subscriptions/${subscriptionId}`, {
|
||||
headers: {
|
||||
'Authorization': AUTHORIZATION,
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -285,7 +285,7 @@ test.describe('Subscriber my account actions', () => {
|
|||
await page.locator('text=View').first().click();
|
||||
|
||||
const subscriptionId = await page.locator('#ppcp-subscription-id').textContent();
|
||||
let subscription = await request.get(`https://api.sandbox.paypal.com/v1/billing/subscriptions/${subscriptionId}`, {
|
||||
let subscription = await request.get(`https://api-m.sandbox.paypal.com/v1/billing/subscriptions/${subscriptionId}`, {
|
||||
headers: {
|
||||
'Authorization': AUTHORIZATION,
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -299,7 +299,7 @@ test.describe('Subscriber my account actions', () => {
|
|||
const title = page.locator('.woocommerce-message');
|
||||
await expect(title).toHaveText('Your subscription has been cancelled.');
|
||||
|
||||
subscription = await request.get(`https://api.sandbox.paypal.com/v1/billing/subscriptions/${subscriptionId}`, {
|
||||
subscription = await request.get(`https://api-m.sandbox.paypal.com/v1/billing/subscriptions/${subscriptionId}`, {
|
||||
headers: {
|
||||
'Authorization': AUTHORIZATION,
|
||||
'Content-Type': 'application/json'
|
||||
|
|
|
@ -21,8 +21,8 @@ namespace WooCommerce\PayPalCommerce;
|
|||
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
|
||||
|
||||
define( 'PAYPAL_API_URL', 'https://api.paypal.com' );
|
||||
define( 'PAYPAL_SANDBOX_API_URL', 'https://api.sandbox.paypal.com' );
|
||||
define( 'PAYPAL_API_URL', 'https://api-m.paypal.com' );
|
||||
define( 'PAYPAL_SANDBOX_API_URL', 'https://api-m.sandbox.paypal.com' );
|
||||
define( 'PAYPAL_INTEGRATION_DATE', '2023-09-26' );
|
||||
|
||||
! defined( 'CONNECT_WOO_CLIENT_ID' ) && define( 'CONNECT_WOO_CLIENT_ID', 'AcCAsWta_JTL__OfpjspNyH7c1GGHH332fLwonA5CwX4Y10mhybRZmHLA0GdRbwKwjQIhpDQy0pluX_P' );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue