Skip to content

Commit

Permalink
Add Bizum Payment Method
Browse files Browse the repository at this point in the history
  • Loading branch information
Mustafa Özcan committed Nov 12, 2024
1 parent f95239d commit 9cbdcef
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
38 changes: 38 additions & 0 deletions samples/init_bizum_apm_payment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?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::BIZUM,
'price' => 1,
'paidPrice' => 1,
'currency' => Currency::EUR,
'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
)
),
'additionalParams' => array(
'buyerPhoneNumber' => "34700000000",
)
);

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

print_r($response);
1 change: 1 addition & 0 deletions src/Model/ApmType.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class ApmType
const CHIPPIN = "CHIPPIN";
const ISPAY = "ISPAY";
const PAYMOB = "PAYMOB";
const BIZUM = "BIZUM";
const FUND_TRANSFER = 'FUND_TRANSFER';
const CASH_ON_DELIVERY = 'CASH_ON_DELIVERY';
}
1 change: 1 addition & 0 deletions src/Model/PaymentProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ class PaymentProvider
const CHIPPIN = "CHIPPIN";
const ISPAY = "ISPAY";
const PAYMOB = "PAYMOB";
const BIZUM = "BIZUM";
const OFFLINE = "OFFLINE";
}

0 comments on commit 9cbdcef

Please sign in to comment.