@akinon/pz-tabby-extension

1.72.0 • Public • Published

Tabby Payment Gateway Extension

Installation

There are two ways to install the Tabby Payment Gateway extension:

1. Install the npm package using Yarn

For the latest version, you can install the package using Yarn:

yarn add @akinon/pz-tabby-extension

2. Preferred installation method

You can also use the following command to install the extension with the latest plugins:

npx @akinon/projectzero@latest --plugins

Usage

Once the extension is installed, you can easily integrate the Tabby payment gateway into your application. Here's an example of how to use it.

  1. Navigate to the src/app/[commerce]/[locale]/[currency]/payment-gateway/tabby/ directory.

  2. Create a file named page.tsx and include the following code:

import { TabbyPaymentGateway } from '@akinon/pz-tabby-extension';

const TabbyGateway = async ({
  searchParams: { sessionId },
  params: { currency, locale }
}: {
  searchParams: Record<string, string>;
  params: { currency: string; locale: string };
}) => {
  return (
    <TabbyPaymentGateway
      sessionId={sessionId}
      currency={currency}
      locale={locale}
      extensionUrl={process.env.TABBY_EXTENSION_URL}
      hashKey={process.env.TABBY_HASH_KEY}
    />
  );
};

export default TabbyGateway;

Configuration

Add these variables to your .env file

TABBY_EXTENSION_URL=<your_extension_url>
TABBY_HASH_KEY=<your_hash_key>

Readme

Keywords

none

Package Sidebar

Install

npm i @akinon/pz-tabby-extension

Weekly Downloads

330

Version

1.72.0

License

MIT

Unpacked Size

9.86 kB

Total Files

9

Last publish

Collaborators

  • akinon