GarantiPay
Last updated
Was this helpful?
Was this helpful?
{
title: 'Pay with GarantiPay',
description: [
'Click on the "GarantiPay" button. Guarantee for payment you will be redirected to the payment page.',
'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.',
'Complete the payment process by selecting your card and payment type.'
],
button: 'Pay with GarantiPay',
error: 'An error occurred during payment'
}/src/views/checkout/steps/payment/options/gpay.tsximport PluginModule, { Component } from '@akinon/next/components/plugin-module';
const GPay = () => {
return (
<PluginModule
component={Component.GPay}
props={{
translations: {
title: 'Pay with GarantiPay',
description: [
'Click on the "Pay with GarantiPay" button. You will be redirected to the payment page.',
'Log in with your credentials. If you don't have an account, create one.',
'Select your card and complete the payment process.'
],
button: 'Pay Now'
},
containerClassName: 'bg-gray-50 p-6 rounded-lg',
titleClassName: 'text-xl font-bold',
descriptionClassName: 'text-sm text-gray-700',
buttonClassName: 'bg-primary text-white py-2'
}}
/>
);
};
export default GPay;import PluginModule, { Component } from '@akinon/next/components/plugin-module';
const GPay = () => {
return (
<PluginModule
component={Component.GPay}
props={{
translations: {
title: 'Pay with GarantiPay',
description: [
'Click the button below to pay for your order using GarantiPay.'
],
button: 'Pay Now'
},
customUIRender: ({ handleSubmit, onSubmit, translations }) => (
<form onSubmit={handleSubmit(onSubmit)} className="p-6 bg-white rounded-md space-y-4">
<h2 className="text-2xl font-semibold">{translations.title}</h2>
<ul className="text-sm text-gray-700 list-disc pl-4">
{translations.description.map((item, index) => (
<li key={index}>{item}</li>
))}
</ul>
<button
type="submit"
className="w-full h-10 bg-black text-white rounded"
>
{translations.button}
</button>
</form>
)
}}
/>
);
};
export default GPay;/src/app/[commerce]/[locale]/[currency]/orders/garanti-pay-redirect/page.tsximport { GarantiPayRedirect } from '@akinon/pz-gpay/src/routes/garanti-pay-redirect';
export default GarantiPayRedirect;