@akinon/pz-gpay 1.96.0-rc.56 → 1.96.0-snapshot-ZERO-35861-20250908151109
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/CHANGELOG.md +1 -57
 - package/package.json +1 -1
 - package/readme.md +40 -95
 
    
        package/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,20 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # @akinon/pz-gpay
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            ## 1.96.0- 
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            ## 1.96.0-rc.55
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            ### Minor Changes
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
            - d8be48fb: ZERO-3422: Update fetch method to use dynamic request method in wallet complete redirection middleware
         
     | 
| 
       10 
     | 
    
         
            -
            - 16aff543: ZERO-3431: Add test script for redirect utility in package.json
         
     | 
| 
       11 
     | 
    
         
            -
            - 64699d3ff: ZERO-2761: Fix invalid import for plugin module
         
     | 
| 
       12 
     | 
    
         
            -
            - e974d8e8: ZERO-3406: Fix rc build
         
     | 
| 
       13 
     | 
    
         
            -
            - 7eb51ca9: ZERO-3424 :Update package versions
         
     | 
| 
       14 
     | 
    
         
            -
            - 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
         
     | 
| 
       15 
     | 
    
         
            -
            - 8b1d24eb: ZERO-3422: Update fetch method to use dynamic request method in wallet complete redirection middleware
         
     | 
| 
       16 
     | 
    
         
            -
            - 2e436c13: ZERO-3389 :Update README.md for GPay component: enhance props documentation, add custom UI usage examples
         
     | 
| 
       17 
     | 
    
         
            -
            - 33377cfd: ZERO-3267: Refactor import statement for ROUTES in error-page component
         
     | 
| 
      
 3 
     | 
    
         
            +
            ## 1.96.0-snapshot-ZERO-35861-20250908151109
         
     | 
| 
       18 
4 
     | 
    
         | 
| 
       19 
5 
     | 
    
         
             
            ## 1.95.0
         
     | 
| 
       20 
6 
     | 
    
         | 
| 
         @@ -26,8 +12,6 @@ 
     | 
|
| 
       26 
12 
     | 
    
         | 
| 
       27 
13 
     | 
    
         
             
            ## 1.91.0
         
     | 
| 
       28 
14 
     | 
    
         | 
| 
       29 
     | 
    
         
            -
            > > > > > > > origin/ZERO-3418
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
15 
     | 
    
         
             
            ## 1.90.0
         
     | 
| 
       32 
16 
     | 
    
         | 
| 
       33 
17 
     | 
    
         
             
            ### Minor Changes
         
     | 
| 
         @@ -39,46 +23,6 @@ 
     | 
|
| 
       39 
23 
     | 
    
         
             
            ### Minor Changes
         
     | 
| 
       40 
24 
     | 
    
         | 
| 
       41 
25 
     | 
    
         
             
            - 57a6184: ZERO-3332 :Add data-testid attribute to GPay payment button for testing
         
     | 
| 
       42 
     | 
    
         
            -
            - 64699d3f: ZERO-2761: Fix invalid import for plugin module
         
     | 
| 
       43 
     | 
    
         
            -
            - 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
         
     | 
| 
       44 
     | 
    
         
            -
            - 33377cfd: ZERO-3267: Refactor import statement for ROUTES in error-page component
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
            ## 1.89.0-rc.9
         
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
            ### Minor Changes
         
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
            - 57a6184: ZERO-3332 :Add data-testid attribute to GPay payment button for testing
         
     | 
| 
       51 
     | 
    
         
            -
            - 64699d3f: ZERO-2761: Fix invalid import for plugin module
         
     | 
| 
       52 
     | 
    
         
            -
            - 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
         
     | 
| 
       53 
     | 
    
         
            -
            - 33377cfd: ZERO-3267: Refactor import statement for ROUTES in error-page component
         
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
       55 
     | 
    
         
            -
            ## 1.89.0-rc.8
         
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
            ## 1.89.0-rc.7
         
     | 
| 
       58 
     | 
    
         
            -
             
     | 
| 
       59 
     | 
    
         
            -
            ## 1.89.0-rc.6
         
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
            ## 1.89.0-rc.5
         
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
            ## 1.89.0-rc.4
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
            ## 1.89.0-rc.3
         
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
            ## 1.89.0-rc.2
         
     | 
| 
       68 
     | 
    
         
            -
             
     | 
| 
       69 
     | 
    
         
            -
            ### Minor Changes
         
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
            - 57a6184: ZERO-3332 :Add data-testid attribute to GPay payment button for testing
         
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
            ## 1.89.0-rc.1
         
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
            ## 1.89.0-rc.0
         
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
            ### Minor Changes
         
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
            - 64699d3f: ZERO-2761: Fix invalid import for plugin module
         
     | 
| 
       80 
     | 
    
         
            -
            - 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
         
     | 
| 
       81 
     | 
    
         
            -
            - 33377cf: ZERO-3267: Refactor import statement for ROUTES in error-page component
         
     | 
| 
       82 
26 
     | 
    
         | 
| 
       83 
27 
     | 
    
         
             
            ## 1.88.0
         
     | 
| 
       84 
28 
     | 
    
         | 
    
        package/package.json
    CHANGED
    
    
    
        package/readme.md
    CHANGED
    
    | 
         @@ -10,86 +10,9 @@ npx @akinon/projectzero@latest --plugins 
     | 
|
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
            ```
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
      
 13 
     | 
    
         
            +
            ### Example Usage
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
            ### Props
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
            | Prop | Type | Required | Description |
         
     | 
| 
       20 
     | 
    
         
            -
            | --- | --- | --- | --- |
         
     | 
| 
       21 
     | 
    
         
            -
            | `containerClassName` | `string` | Optional | Custom class for the root `<form>` container |
         
     | 
| 
       22 
     | 
    
         
            -
            | `titleClassName` | `string` | Optional | Class for the title (`<h1>` element) |
         
     | 
| 
       23 
     | 
    
         
            -
            | `descriptionClassName` | `string` | Optional | Class for the description container |
         
     | 
| 
       24 
     | 
    
         
            -
            | `buttonClassName` | `string` | Optional | Class for the submit button |
         
     | 
| 
       25 
     | 
    
         
            -
            | `translations` | `Partial<GPayTranslations>` | Optional | Override default title, description, button and error texts |
         
     | 
| 
       26 
     | 
    
         
            -
            | `customUIRender` | `function` | Optional | Function to override the internal rendering logic and provide custom layout |
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
            ---
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
            ### `customUIRender` Parameters
         
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
            | Parameter | Type | Description |
         
     | 
| 
       33 
     | 
    
         
            -
            | --- | --- | --- |
         
     | 
| 
       34 
     | 
    
         
            -
            | `handleSubmit` | `UseFormHandleSubmit<GPayForm>` | Wrapper for your `onSubmit` function with validation |
         
     | 
| 
       35 
     | 
    
         
            -
            | `onSubmit` | `SubmitHandler<GPayForm>` | Submit logic that handles payment integration internally |
         
     | 
| 
       36 
     | 
    
         
            -
            | `control` | `Control<GPayForm>` | React Hook Form control object, useful for controlled inputs |
         
     | 
| 
       37 
     | 
    
         
            -
            | `errors` | `FieldErrors<GPayForm>` | Validation errors, helpful for form field error handling |
         
     | 
| 
       38 
     | 
    
         
            -
            | `translations` | `GPayTranslations` | Final translation object with merged defaults and overrides |
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
            ### Default Translations
         
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
            ```javascript
         
     | 
| 
       43 
     | 
    
         
            -
            {
         
     | 
| 
       44 
     | 
    
         
            -
              title: 'Pay with GarantiPay',
         
     | 
| 
       45 
     | 
    
         
            -
              description: [
         
     | 
| 
       46 
     | 
    
         
            -
                'Click on the "GarantiPay" button. Guarantee for payment you will be redirected to the payment page.',
         
     | 
| 
       47 
     | 
    
         
            -
                'Log in to your account with your username and password on the Garanti Pay page. If you do not have a Garanti Pay membership, create a new membership you can create.',
         
     | 
| 
       48 
     | 
    
         
            -
                'Complete the payment process by selecting your card and payment type.'
         
     | 
| 
       49 
     | 
    
         
            -
              ],
         
     | 
| 
       50 
     | 
    
         
            -
              button: 'Pay with GarantiPay',
         
     | 
| 
       51 
     | 
    
         
            -
              error: 'An error occurred during payment'
         
     | 
| 
       52 
     | 
    
         
            -
            }
         
     | 
| 
       53 
     | 
    
         
            -
            ```
         
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
       55 
     | 
    
         
            -
            ### Usage Examples
         
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
            ```bash
         
     | 
| 
       58 
     | 
    
         
            -
            /src/views/checkout/steps/payment/options/gpay.tsx
         
     | 
| 
       59 
     | 
    
         
            -
            ```
         
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
            ## Default Usage
         
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
            ```javascript
         
     | 
| 
       64 
     | 
    
         
            -
            import PluginModule, { Component } from '@akinon/next/components/plugin-module';
         
     | 
| 
       65 
     | 
    
         
            -
             
     | 
| 
       66 
     | 
    
         
            -
            const GPay = () => {
         
     | 
| 
       67 
     | 
    
         
            -
              return (
         
     | 
| 
       68 
     | 
    
         
            -
                <PluginModule
         
     | 
| 
       69 
     | 
    
         
            -
                  component={Component.GPay}
         
     | 
| 
       70 
     | 
    
         
            -
                  props={{
         
     | 
| 
       71 
     | 
    
         
            -
                    translations: {
         
     | 
| 
       72 
     | 
    
         
            -
                      title: 'Pay with GarantiPay',
         
     | 
| 
       73 
     | 
    
         
            -
                      description: [
         
     | 
| 
       74 
     | 
    
         
            -
                        'Click on the "Pay with GarantiPay" button. You will be redirected to the payment page.',
         
     | 
| 
       75 
     | 
    
         
            -
                        'Log in with your credentials. If you don’t have an account, create one.',
         
     | 
| 
       76 
     | 
    
         
            -
                        'Select your card and complete the payment process.'
         
     | 
| 
       77 
     | 
    
         
            -
                      ],
         
     | 
| 
       78 
     | 
    
         
            -
                      button: 'Pay Now'
         
     | 
| 
       79 
     | 
    
         
            -
                    },
         
     | 
| 
       80 
     | 
    
         
            -
                    containerClassName: 'bg-gray-50 p-6 rounded-lg',
         
     | 
| 
       81 
     | 
    
         
            -
                    titleClassName: 'text-xl font-bold',
         
     | 
| 
       82 
     | 
    
         
            -
                    descriptionClassName: 'text-sm text-gray-700',
         
     | 
| 
       83 
     | 
    
         
            -
                    buttonClassName: 'bg-primary text-white py-2'
         
     | 
| 
       84 
     | 
    
         
            -
                  }}
         
     | 
| 
       85 
     | 
    
         
            -
                />
         
     | 
| 
       86 
     | 
    
         
            -
              );
         
     | 
| 
       87 
     | 
    
         
            -
            };
         
     | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
       89 
     | 
    
         
            -
            export default GPay;
         
     | 
| 
       90 
     | 
    
         
            -
            ```
         
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
       92 
     | 
    
         
            -
            ## Custom UI Usage
         
     | 
| 
      
 15 
     | 
    
         
            +
            ##### File Path: src/views/checkout/steps/payment/options/gpay.tsx
         
     | 
| 
       93 
16 
     | 
    
         | 
| 
       94 
17 
     | 
    
         
             
            ```javascript
         
     | 
| 
       95 
18 
     | 
    
         
             
            import PluginModule, { Component } from '@akinon/next/components/plugin-module';
         
     | 
| 
         @@ -101,25 +24,25 @@ const GPay = () => { 
     | 
|
| 
       101 
24 
     | 
    
         
             
                  props={{
         
     | 
| 
       102 
25 
     | 
    
         
             
                    translations: {
         
     | 
| 
       103 
26 
     | 
    
         
             
                      title: 'Pay with GarantiPay',
         
     | 
| 
       104 
     | 
    
         
            -
                      description: 
     | 
| 
       105 
     | 
    
         
            -
                        'Click the button below to pay for your order using GarantiPay.'
         
     | 
| 
       106 
     | 
    
         
            -
                      ],
         
     | 
| 
      
 27 
     | 
    
         
            +
                      description:
         
     | 
| 
      
 28 
     | 
    
         
            +
                        'Click the button below to pay for your order using GarantiPay.',
         
     | 
| 
       107 
29 
     | 
    
         
             
                      button: 'Pay Now'
         
     | 
| 
       108 
30 
     | 
    
         
             
                    },
         
     | 
| 
      
 31 
     | 
    
         
            +
                    containerClassName: 'bg-gray-50 rounded-md',
         
     | 
| 
      
 32 
     | 
    
         
            +
                    titleClassName: 'text-2xl font-bold',
         
     | 
| 
      
 33 
     | 
    
         
            +
                    descriptionClassName: 'text-sm',
         
     | 
| 
      
 34 
     | 
    
         
            +
                    buttonClassName: 'bg-primary text-white',
         
     | 
| 
       109 
35 
     | 
    
         
             
                    customUIRender: ({ handleSubmit, onSubmit, translations }) => (
         
     | 
| 
       110 
     | 
    
         
            -
                      <form
         
     | 
| 
       111 
     | 
    
         
            -
                         
     | 
| 
       112 
     | 
    
         
            -
                        className=" 
     | 
| 
       113 
     | 
    
         
            -
                      >
         
     | 
| 
       114 
     | 
    
         
            -
                        <h2 className="text-2xl font-semibold">{translations.title}</h2>
         
     | 
| 
       115 
     | 
    
         
            -
                        <ul className="text-sm text-gray-700 list-disc pl-4">
         
     | 
| 
      
 36 
     | 
    
         
            +
                      <form onSubmit={handleSubmit(onSubmit)} className="p-6 bg-white">
         
     | 
| 
      
 37 
     | 
    
         
            +
                        <h2 className="text-xl font-bold mb-2">{translations.title}</h2>
         
     | 
| 
      
 38 
     | 
    
         
            +
                        <div className="text-sm mb-4">
         
     | 
| 
       116 
39 
     | 
    
         
             
                          {translations.description.map((item, index) => (
         
     | 
| 
       117 
40 
     | 
    
         
             
                            <li key={index}>{item}</li>
         
     | 
| 
       118 
41 
     | 
    
         
             
                          ))}
         
     | 
| 
       119 
     | 
    
         
            -
                        </ 
     | 
| 
      
 42 
     | 
    
         
            +
                        </div>
         
     | 
| 
       120 
43 
     | 
    
         
             
                        <button
         
     | 
| 
       121 
44 
     | 
    
         
             
                          type="submit"
         
     | 
| 
       122 
     | 
    
         
            -
                          className="w-full h- 
     | 
| 
      
 45 
     | 
    
         
            +
                          className="w-full h-9 bg-black-300 text-white"
         
     | 
| 
       123 
46 
     | 
    
         
             
                        >
         
     | 
| 
       124 
47 
     | 
    
         
             
                          {translations.button}
         
     | 
| 
       125 
48 
     | 
    
         
             
                        </button>
         
     | 
| 
         @@ -133,14 +56,36 @@ const GPay = () => { 
     | 
|
| 
       133 
56 
     | 
    
         
             
            export default GPay;
         
     | 
| 
       134 
57 
     | 
    
         
             
            ```
         
     | 
| 
       135 
58 
     | 
    
         | 
| 
       136 
     | 
    
         
            -
             
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
            ```bash
         
     | 
| 
       139 
     | 
    
         
            -
            /src/app/[commerce]/[locale]/[currency]/orders/garanti-pay-redirect/page.tsx
         
     | 
| 
       140 
     | 
    
         
            -
            ```
         
     | 
| 
      
 59 
     | 
    
         
            +
            ##### File Path: src/app/[commerce]/[locale]/[currency]/orders/garanti-pay-redirect/page.tsx
         
     | 
| 
       141 
60 
     | 
    
         | 
| 
       142 
61 
     | 
    
         
             
            ```javascript
         
     | 
| 
       143 
62 
     | 
    
         
             
            import { GarantiPayRedirect } from '@akinon/pz-gpay/src/routes/garanti-pay-redirect';
         
     | 
| 
       144 
63 
     | 
    
         | 
| 
       145 
64 
     | 
    
         
             
            export default GarantiPayRedirect;
         
     | 
| 
       146 
65 
     | 
    
         
             
            ```
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
            ### Props
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
            | Properties | Type | Description |
         
     | 
| 
      
 70 
     | 
    
         
            +
            | --- | --- | --- |
         
     | 
| 
      
 71 
     | 
    
         
            +
            | translations | object | The translations of the component. |
         
     | 
| 
      
 72 
     | 
    
         
            +
            | containerClassName | string | The CSS class to apply to the container. |
         
     | 
| 
      
 73 
     | 
    
         
            +
            | titleClassName | string | The CSS class to apply to the title. |
         
     | 
| 
      
 74 
     | 
    
         
            +
            | descriptionClassName | string | The CSS class to apply to the description. |
         
     | 
| 
      
 75 
     | 
    
         
            +
            | buttonClassName | string | The CSS class to apply to the button. |
         
     | 
| 
      
 76 
     | 
    
         
            +
            | customUIRender | function | Custom render function for the component. Receives form handlers and translations. |
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
            ### Default Translations
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
            ```javascript
         
     | 
| 
      
 81 
     | 
    
         
            +
            {
         
     | 
| 
      
 82 
     | 
    
         
            +
              title: 'Pay with GarantiPay',
         
     | 
| 
      
 83 
     | 
    
         
            +
              description: [
         
     | 
| 
      
 84 
     | 
    
         
            +
                'Click on the "GarantiPay" button. Guarantee for payment you will be redirected to the payment page.',
         
     | 
| 
      
 85 
     | 
    
         
            +
                'Log in to your account with your username and password on the Garanti Pay page. If you do not have a Garanti Pay membership, create a new membership you can create.',
         
     | 
| 
      
 86 
     | 
    
         
            +
                'Complete the payment process by selecting your card and payment type.'
         
     | 
| 
      
 87 
     | 
    
         
            +
              ],
         
     | 
| 
      
 88 
     | 
    
         
            +
              button: 'Pay with GarantiPay',
         
     | 
| 
      
 89 
     | 
    
         
            +
              error: 'An error occurred during payment'
         
     | 
| 
      
 90 
     | 
    
         
            +
            }
         
     | 
| 
      
 91 
     | 
    
         
            +
            ```
         
     |