Skip to content

Commit e41132c

Browse files
feat(payment): PAYPAL-4284 reverted PPCP onShippingAddressChange and onShippingOptionChange callbacks
1 parent 8e55d90 commit e41132c

9 files changed

+22
-22
lines changed

packages/paypal-commerce-integration/src/paypal-commerce-credit/paypal-commerce-credit-button-strategy.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ describe('PayPalCommerceCreditButtonStrategy', () => {
9696

9797
const paypalShippingAddressPayloadMock = {
9898
city: 'New York',
99-
country_code: 'US',
100-
postal_code: '07564',
99+
countryCode: 'US',
100+
postalCode: '07564',
101101
state: 'New York',
102102
};
103103

@@ -720,8 +720,8 @@ describe('PayPalCommerceCreditButtonStrategy', () => {
720720
address1: '',
721721
address2: '',
722722
city: paypalShippingAddressPayloadMock.city,
723-
countryCode: paypalShippingAddressPayloadMock.country_code,
724-
postalCode: paypalShippingAddressPayloadMock.postal_code,
723+
countryCode: paypalShippingAddressPayloadMock.countryCode,
724+
postalCode: paypalShippingAddressPayloadMock.postalCode,
725725
stateOrProvince: '',
726726
stateOrProvinceCode: paypalShippingAddressPayloadMock.state,
727727
customFields: [],

packages/paypal-commerce-integration/src/paypal-commerce-credit/paypal-commerce-credit-button-strategy.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ export default class PayPalCommerceCreditButtonStrategy implements CheckoutButto
238238
): Promise<void> {
239239
const address = this.paypalCommerceIntegrationService.getAddress({
240240
city: data.shippingAddress.city,
241-
countryCode: data.shippingAddress.country_code,
242-
postalCode: data.shippingAddress.postal_code,
241+
countryCode: data.shippingAddress.countryCode,
242+
postalCode: data.shippingAddress.postalCode,
243243
stateOrProvinceCode: data.shippingAddress.state,
244244
});
245245

packages/paypal-commerce-integration/src/paypal-commerce-credit/paypal-commerce-credit-customer-strategy.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ describe('PayPalCommerceCreditCustomerStrategy', () => {
143143
orderId: approveDataOrderId,
144144
shippingAddress: {
145145
city: 'New York',
146-
country_code: 'US',
147-
postal_code: '07564',
146+
countryCode: 'US',
147+
postalCode: '07564',
148148
state: 'New York',
149149
},
150150
});

packages/paypal-commerce-integration/src/paypal-commerce-credit/paypal-commerce-credit-customer-strategy.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ export default class PayPalCommerceCreditCustomerStrategy implements CustomerStr
203203
): Promise<void> {
204204
const address = this.paypalCommerceIntegrationService.getAddress({
205205
city: data.shippingAddress.city,
206-
countryCode: data.shippingAddress.country_code,
207-
postalCode: data.shippingAddress.postal_code,
206+
countryCode: data.shippingAddress.countryCode,
207+
postalCode: data.shippingAddress.postalCode,
208208
stateOrProvinceCode: data.shippingAddress.state,
209209
});
210210

packages/paypal-commerce-integration/src/paypal-commerce-types.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ export interface InitCallbackActions {
395395

396396
export interface PayPalAddress {
397397
city: string;
398-
country_code: string;
399-
postal_code: string;
398+
countryCode: string;
399+
postalCode: string;
400400
state: string;
401401
}
402402

packages/paypal-commerce-integration/src/paypal-commerce/paypal-commerce-button-strategy.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ describe('PayPalCommerceButtonStrategy', () => {
8383

8484
const paypalShippingAddressPayloadMock = {
8585
city: 'New York',
86-
country_code: 'US',
87-
postal_code: '07564',
86+
countryCode: 'US',
87+
postalCode: '07564',
8888
state: 'New York',
8989
};
9090

@@ -670,8 +670,8 @@ describe('PayPalCommerceButtonStrategy', () => {
670670
address1: '',
671671
address2: '',
672672
city: paypalShippingAddressPayloadMock.city,
673-
countryCode: paypalShippingAddressPayloadMock.country_code,
674-
postalCode: paypalShippingAddressPayloadMock.postal_code,
673+
countryCode: paypalShippingAddressPayloadMock.countryCode,
674+
postalCode: paypalShippingAddressPayloadMock.postalCode,
675675
stateOrProvince: '',
676676
stateOrProvinceCode: paypalShippingAddressPayloadMock.state,
677677
customFields: [],

packages/paypal-commerce-integration/src/paypal-commerce/paypal-commerce-button-strategy.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ export default class PayPalCommerceButtonStrategy implements CheckoutButtonStrat
202202
): Promise<void> {
203203
const address = this.paypalCommerceIntegrationService.getAddress({
204204
city: data.shippingAddress.city,
205-
countryCode: data.shippingAddress.country_code,
206-
postalCode: data.shippingAddress.postal_code,
205+
countryCode: data.shippingAddress.countryCode,
206+
postalCode: data.shippingAddress.postalCode,
207207
stateOrProvinceCode: data.shippingAddress.state,
208208
});
209209

packages/paypal-commerce-integration/src/paypal-commerce/paypal-commerce-customer-strategy.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ describe('PayPalCommerceCustomerStrategy', () => {
139139
orderId: approveDataOrderId,
140140
shippingAddress: {
141141
city: 'New York',
142-
country_code: 'US',
143-
postal_code: '07564',
142+
countryCode: 'US',
143+
postalCode: '07564',
144144
state: 'New York',
145145
},
146146
});

packages/paypal-commerce-integration/src/paypal-commerce/paypal-commerce-customer-strategy.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ export default class PayPalCommerceCustomerStrategy implements CustomerStrategy
196196
): Promise<void> {
197197
const address = this.paypalCommerceIntegrationService.getAddress({
198198
city: data.shippingAddress.city,
199-
countryCode: data.shippingAddress.country_code,
200-
postalCode: data.shippingAddress.postal_code,
199+
countryCode: data.shippingAddress.countryCode,
200+
postalCode: data.shippingAddress.postalCode,
201201
stateOrProvinceCode: data.shippingAddress.state,
202202
});
203203

0 commit comments

Comments
 (0)