Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: paypal modes #870

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/components/PayPal/PayPalCreditCardForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ onMounted(() => {

if (order) {
await executeOrder({
mode: 'paypal',
mode: 'PAYPAL_UNBRANDED_CARD',
plentyOrderId: Number.parseInt(orderGetters.getId(order)),
paypalTransactionId: data.orderID,
});
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/PayPal/PayPalExpressButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const onApprove = async (data: OnApproveData) => {

if (order) {
await executeOrder({
mode: 'paypal',
mode: 'PAYPAL',
plentyOrderId: Number.parseInt(orderGetters.getId(order)),
paypalTransactionId: data.orderID,
});
Expand Down
2 changes: 1 addition & 1 deletion apps/web/composables/useApplePay/useApplePay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
state.value.scriptLoaded = true;
}

state.value.script = (script as any).Applepay() as ApplepayType;

Check warning on line 42 in apps/web/composables/useApplePay/useApplePay.ts

View workflow job for this annotation

GitHub Actions / fitness-code-quality

Unexpected any. Specify a different type
state.value.config = await state.value.script.config();

return true;
Expand Down Expand Up @@ -120,7 +120,7 @@
});

await executeOrder({
mode: 'paypal',
mode: 'PAYPAL_APPLE_PAY',
plentyOrderId: Number.parseInt(orderGetters.getId(order)),
paypalTransactionId: transaction.id,
});
Expand Down
2 changes: 1 addition & 1 deletion apps/web/composables/useGooglePay/useGooglePay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
state.value.scriptLoaded = true;
}

state.value.script = (script as any).Googlepay() as GooglePayPayPal;

Check warning on line 45 in apps/web/composables/useGooglePay/useGooglePay.ts

View workflow job for this annotation

GitHub Actions / fitness-code-quality

Unexpected any. Specify a different type
state.value.googleConfig = await state.value.script.config();
state.value.paymentsClient = getPaymentsClient();

Expand Down Expand Up @@ -127,7 +127,7 @@
}

await executeOrder({
mode: 'paypal',
mode: 'PAYPAL_GOOGLE_PAY',
plentyOrderId: Number.parseInt(orderGetters.getId(order)),
paypalTransactionId: transaction.id,
});
Expand Down
2 changes: 1 addition & 1 deletion apps/web/composables/usePayPal/usePayPal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export const usePayPal = () => {
* @example
* ``` ts
* executeOrder({
* mode: 'paypal',
* mode: 'PAYPAL',
* plentyOrderId: 1234,
* paypalTransactionId: 'UHIhhur3h2rh2',
* });
Expand Down
2 changes: 1 addition & 1 deletion apps/web/pages/readonly-checkout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ const handleRegularOrder = async () => {

if (data) {
await executeOrder({
mode: 'paypal',
mode: 'PAYPAL',
plentyOrderId: Number.parseInt(orderGetters.getId(data)),
paypalTransactionId: route?.query?.orderId?.toString() ?? '',
});
Expand Down
1 change: 1 addition & 0 deletions docs/changelog/changelog_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Each client supports two PWA instances. With this change, you can designate the
- Improved CLS for hero skeleton.
- Fixed, createOrder now handles errors more reliable and resets the buy button if an error occurs.
- Added missing condition to block action.
- Fixed a bug where PayPal payments were stored as "Cash in Advance".

## v1.7.0 (2024-11-06) <a href="https://github.com/plentymarkets/plentyshop-pwa/compare/v1.6.0...v1.7.0" target="_blank" rel="noopener"><b>Overview of all changes</b></a>

Expand Down
Loading