diff --git a/samples/complete_setcard_gift_apm_payment.php b/samples/complete_setcard_gift_apm_payment.php new file mode 100644 index 0000000..f393304 --- /dev/null +++ b/samples/complete_setcard_gift_apm_payment.php @@ -0,0 +1,14 @@ + 1, + 'additionalParams' => array( + 'otpCode' => '784294' + ) +); + +$response = SampleConfig::craftgate()->payment()->completeApmPayment($request); + +print_r($response); diff --git a/samples/init_setcard_gift_apm_payment.php b/samples/init_setcard_gift_apm_payment.php new file mode 100644 index 0000000..a3d9eeb --- /dev/null +++ b/samples/init_setcard_gift_apm_payment.php @@ -0,0 +1,38 @@ + ApmType::SETCARD_GIFT, + 'price' => 1, + 'paidPrice' => 1, + 'currency' => Currency::TL, + '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 + ) + ), + 'additionalParams' => array( + 'cardNumber' => "7500131700998087", + ) +); + +$response = SampleConfig::craftgate()->payment()->initApmPayment($request); + +print_r($response); diff --git a/src/Model/ApmType.php b/src/Model/ApmType.php index 21cd59b..cb30e4f 100644 --- a/src/Model/ApmType.php +++ b/src/Model/ApmType.php @@ -46,5 +46,6 @@ class ApmType const FUND_TRANSFER = 'FUND_TRANSFER'; const CASH_ON_DELIVERY = 'CASH_ON_DELIVERY'; const SETCARD = 'SETCARD'; + const SETCARD_GIFT = 'SETCARD_GIFT'; const ALBARAKA = 'ALBARAKA'; } diff --git a/src/Model/PaymentMethod.php b/src/Model/PaymentMethod.php index b6b8349..fc1dd51 100644 --- a/src/Model/PaymentMethod.php +++ b/src/Model/PaymentMethod.php @@ -12,6 +12,8 @@ class PaymentMethod const SODEXO_GIFT = 'SODEXO_GIFT'; const EDENRED = 'EDENRED'; const EDENRED_GIFT = 'EDENRED_GIFT'; + const SETCARD = 'SETCARD'; + const SETCARD_GIFT = 'SETCARD_GIFT'; const TOKENFLEX = 'TOKENFLEX'; const TOKENFLEX_GIFT = 'TOKENFLEX_GIFT'; const STRIPE = 'STRIPE';