PHP code example of alaikis / dimebia-php
1. Go to this page and download the library: Download alaikis/dimebia-php library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
alaikis / dimebia-php example snippets
$key = "";
$secret = "";
$client = new Dimebia($key, $secret);
$payment = $client->paymentApply([
"amount" => [
"value" => 100,
"currency" => "EUR",
],
'channel_id' => 1000,
"description"' => "make a payment by api",
])
$key = "";
$secret = "";
$client = new Dimebia($key, $secret);
$payment = $client->paymentApply([
"amount" => [
"value" => 100,
"currency" => "EUR",
],
"billing_address" => [
"streetAndNumber" => "Keizersgracht 313",
"postalCode" => "1016 EE",
"city" => "Amsterdam",
"country" => "nl",
"givenName" => "Luke",
"familyName" => "Skywalker",
"email" => "[email protected] ",
],
"shipping_address" => [
"streetAndNumber" => "Keizersgracht 313",
"postalCode" => "1016 EE",
"city" => "Amsterdam",
"country" => "nl",
"givenName" => "Luke",
"familyName" => "Skywalker",
"email" => "[email protected] ",
],
"locale" => "en_US",
"orderNumber" => "1234",
'channel_id' => 1000,
"description"' => "make a payment by api",
"redirect_url" => "https://example.com/payment-success",
"cancel_url" => "https://example.com/payment-failed",
"webhookUrl" => "https://example.com/webhook",
"lines" => [
[
"sku" => "5702016116977",
"name" => "LEGO 42083 Bugatti Chiron",
"productUrl" => "https://shop.lego.com/nl-NL/Bugatti-Chiron-42083",
"imageUrl" => 'https://sh-s7-live-s.legocdn.com/is/image//LEGO/42083_alt1?$main$',
"quantity" => 2,
"vatRate" => "21.00",
"unitPrice" => [
"currency" => "EUR",
"value" => "399.00",
],
"totalAmount" => [
"currency" => "EUR",
"value" => "698.00",
],
"discountAmount" => [
"currency" => "EUR",
"value" => "100.00",
],
"vatAmount" => [
"currency" => "EUR",
"value" => "121.14",
],
],
// more order line items
],
])
shell
composer