Skip to content

Commit

Permalink
Adds kaspi and KZT currency (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
abalikci authored Sep 22, 2023
1 parent bf4cd9c commit 883a014
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 0 deletions.
35 changes: 35 additions & 0 deletions samples/init_kaspi_apm_payment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

require_once('config/sample_config.php');

use Craftgate\Model\ApmType;
use Craftgate\Model\Currency;
use Craftgate\Model\PaymentGroup;
use Craftgate\Util\Guid;

$request = array(
'apmType' => ApmType::KASPI,
'price' => 1,
'paidPrice' => 1,
'currency' => Currency::KZT,
'paymentGroup' => PaymentGroup::LISTING_OR_SUBSCRIPTION,
'conversationId' => '456d1297-908e-4bd6-a13b-4be31a6e47d5',
'externalId' => 'optional-externalId',
'callbackUrl' => 'https://www.your-website.com/craftgate-apm-callback',
'items' => array(
array(
'externalId' => Guid::generate(),
'name' => 'Item 1',
'price' => 0.40
),
array(
'externalId' => Guid::generate(),
'name' => 'Item 2',
'price' => 0.60
)
)
);

$response = SampleConfig::craftgate()->payment()->initApmPayment($request);

print_r($response);
2 changes: 2 additions & 0 deletions src/Model/ApmType.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class ApmType
const PAYPAL = 'PAYPAL';
const KLARNA = 'KLARNA';
const AFTERPAY = 'AFTERPAY';
const STRIPE = 'STRIPE';
const KASPI = 'KASPI';
const FUND_TRANSFER = 'FUND_TRANSFER';
const CASH_ON_DELIVERY = 'CASH_ON_DELIVERY';
}
1 change: 1 addition & 0 deletions src/Model/Currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ class Currency
const AED = 'AED';
const IQD = 'IQD';
const AZN = 'AZN';
const KZT = 'KZT';
}
2 changes: 2 additions & 0 deletions src/Model/PaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class PaymentMethod
const SODEXO = 'SODEXO';
const EDENRED = 'EDENRED';
const EDENRED_GIFT = 'EDENRED_GIFT';
const STRIPE = 'STRIPE';
const KASPI = 'KASPI';
const ALIPAY = 'ALIPAY';
const PAYPAL = 'PAYPAL';
const KLARNA = 'KLARNA';
Expand Down
2 changes: 2 additions & 0 deletions src/Model/PaymentProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class PaymentProvider
const PAYONEER = "PAYONEER";
const SODEXO = "SODEXO";
const EDENRED = "EDENRED";
const STRIPE = "STRIPE";
const KASPI = "KASPI";
const YKB_WORLD_PAY = "YKB_WORLD_PAY";
const APPLEPAY = "APPLEPAY";
const GOOGLEPAY = "GOOGLEPAY";
Expand Down

0 comments on commit 883a014

Please sign in to comment.