@autobusal/routes-order 1.37.2 → 1.37.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Step5/Payments/Payments.tsx +10 -2
- package/Step5/utilities.ts +1 -0
- package/package.json +1 -1
- package/types.ts +2 -1
|
@@ -56,9 +56,9 @@ const Payments = ({ selected, isPartner, routeId, total, currency, t, onChange }
|
|
|
56
56
|
* than one card option each button now carries its processor's name;
|
|
57
57
|
* a single card gateway keeps the plain label it always had.
|
|
58
58
|
*/
|
|
59
|
-
const CARD_GATEWAYS = ['bkt', 'stripe', 'mollie', 'raiffeisen', 'nexi'] as const;
|
|
59
|
+
const CARD_GATEWAYS = ['bkt', 'stripe', 'mollie', 'raiffeisen', 'nexi', 'mgpay'] as const;
|
|
60
60
|
const cardCount = isPartner ? CARD_GATEWAYS.length : CARD_GATEWAYS.filter(gateway => data?.[gateway]).length;
|
|
61
|
-
const CARD_NAMES: Record<string, string> = { bkt: 'BKT', stripe: 'Stripe', mollie: 'Mollie', raiffeisen: 'Raiffeisen', nexi: 'Nexi' };
|
|
61
|
+
const CARD_NAMES: Record<string, string> = { bkt: 'BKT', stripe: 'Stripe', mollie: 'Mollie', raiffeisen: 'Raiffeisen', nexi: 'Nexi', mgpay: 'Magus Pay' };
|
|
62
62
|
const cardLabel = (gateway: string): string => (
|
|
63
63
|
cardCount > 1 ? `${ t('routes_order.step5.actions.card') } (${ CARD_NAMES[gateway] })` : t('routes_order.step5.actions.card')
|
|
64
64
|
);
|
|
@@ -194,6 +194,14 @@ const Payments = ({ selected, isPartner, routeId, total, currency, t, onChange }
|
|
|
194
194
|
{ cardLabel('nexi') }{ fee('nexi') }
|
|
195
195
|
</ButtonPayment>
|
|
196
196
|
) }
|
|
197
|
+
{ /* Claude - 2026-09-07: the Magus Pay Hub - hosted checkout on
|
|
198
|
+
pay.magusgroup.al, settled by its signed notification */ }
|
|
199
|
+
{ (data?.mgpay || isPartner) && (
|
|
200
|
+
<ButtonPayment type="button" $selected={ selected === 'mgpay' } onClick={ () => onChange('mgpay') }>
|
|
201
|
+
<AiOutlineCreditCard />
|
|
202
|
+
{ cardLabel('mgpay') }{ fee('mgpay') }
|
|
203
|
+
</ButtonPayment>
|
|
204
|
+
) }
|
|
197
205
|
</ContainerPayments>
|
|
198
206
|
</Container>
|
|
199
207
|
</>
|
package/Step5/utilities.ts
CHANGED
|
@@ -74,6 +74,7 @@ export const getAvailablePayments = (data?: ActionData, isPartner = false): stri
|
|
|
74
74
|
if (data.mollie || isPartner) { available.push('mollie'); }
|
|
75
75
|
if (data.raiffeisen || isPartner) { available.push('raiffeisen'); }
|
|
76
76
|
if (data.nexi || isPartner) { available.push('nexi'); }
|
|
77
|
+
if (data.mgpay || isPartner) { available.push('mgpay'); }
|
|
77
78
|
|
|
78
79
|
return available;
|
|
79
80
|
};
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -48,6 +48,7 @@ export interface ActionData {
|
|
|
48
48
|
mollie: boolean
|
|
49
49
|
raiffeisen: boolean
|
|
50
50
|
nexi: boolean
|
|
51
|
+
mgpay: boolean
|
|
51
52
|
/**
|
|
52
53
|
* The card surcharge each gateway carries on this brand, as a PERCENTAGE
|
|
53
54
|
* (5 means 5%) - see obtapi Payments\Surcharge.
|
|
@@ -56,7 +57,7 @@ export interface ActionData {
|
|
|
56
57
|
* obtapi does not send it, and a brand on a mixed deploy must show no
|
|
57
58
|
* surcharge rather than NaN.
|
|
58
59
|
*/
|
|
59
|
-
surcharges?: Partial<Record<'bkt' | 'stripe' | 'mollie' | 'raiffeisen' | 'nexi', number>>
|
|
60
|
+
surcharges?: Partial<Record<'bkt' | 'stripe' | 'mollie' | 'raiffeisen' | 'nexi' | 'mgpay', number>>
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
export interface SaveData {
|