[go: up one dir, main page]

Skip to content

Commit

Permalink
init chippin apm payment added (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
beratallahverdi authored Sep 30, 2024
1 parent 31cae6e commit 77ac9fd
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions samples/init_chippin_apm_payment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?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::CHIPPIN,
'apmUserIdentity' => 1000000, // Chippin Kullanıcı No
'price' => 1,
'paidPrice' => 1,
'currency' => Currency::TL,
'paymentGroup' => PaymentGroup::LISTING_OR_SUBSCRIPTION,
'conversationId' => 'conversationId',
'externalId' => '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);

0 comments on commit 77ac9fd

Please sign in to comment.