PHP code example of konfig / splitit-web-php-guzzle6-sdk
1. Go to this page and download the library: Download konfig/splitit-web-php-guzzle6-sdk 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/ */
konfig / splitit-web-php-guzzle6-sdk example snippets
itit = new \Splitit\Client(
getenv("SPLITIT_CLIENT_ID"),
getenv("SPLITIT_CLIENT_SECRET")
);
$result = $splitit->installmentPlan->checkEligibility(
"X-Splitit-IdempotencyKey_example",
"",
[
"total_amount" => 3.14,
"number_of_installments" => 1,
"purchase_method" => "InStore",
"strategy" => "SecuredPlan",
],
[
"card_brand" => "Mastercard",
"card_type" => "Credit",
],
[
],
"string_example"
);
$result = $splitit->installmentPlan->checkEligibility(
"X-Splitit-IdempotencyKey_example",
"",
[
"total_amount" => 3.14,
"number_of_installments" => 1,
"purchase_method" => "InStore",
"strategy" => "SecuredPlan",
],
[
"card_brand" => "Mastercard",
"card_type" => "Credit",
],
[
],
"string_example"
);
$result = $splitit->installmentPlan->get(
"installmentPlanNumber_example",
"X-Splitit-IdempotencyKey_example",
""
);
$result = $splitit->installmentPlan->getEligibilityTermsAndCondition(
"ipn_example",
"X-Splitit-IdempotencyKey_example",
""
);
$result = $splitit->installmentPlan->post(
"X-Splitit-IdempotencyKey_example",
"",
True,
True,
[
],
[
"total_amount" => 3.14,
"purchase_method" => "InStore",
],
[
],
[
],
[
],
[
],
[
],
"None",
"SecuredPlan",
"string_example"
);
$result = $splitit->installmentPlan->post2(
True,
True,
"X-Splitit-IdempotencyKey_example",
"",
True,
[
],
[
"total_amount" => 3.14,
"purchase_method" => "InStore",
],
[
],
[
"type" => "Card",
],
[
],
[
],
[
],
"None",
"SecuredPlan",
"string_example"
);
$result = $splitit->installmentPlan->refund(
3.14,
"installmentPlanNumber_example",
"X-Splitit-IdempotencyKey_example",
"",
"FutureInstallmentsFirst",
"string_example"
);
$result = $splitit->installmentPlan->search(
"X-Splitit-IdempotencyKey_example",
"",
"string_example",
"string_example",
[
"key": "string_example",
]
);
$result = $splitit->installmentPlan->updateOrder(
"installmentPlanNumber_example",
"X-Splitit-IdempotencyKey_example",
"",
"string_example",
"string_example",
True,
"Pending",
3.14
);
$result = $splitit->installmentPlan->updateOrder2(
"X-Splitit-IdempotencyKey_example",
"",
"string_example",
"string_example",
True,
"Pending",
3.14,
[
]
);
$result = $splitit->installmentPlan->verifyAuthorization(
"installmentPlanNumber_example",
"X-Splitit-IdempotencyKey_example",
""
);
json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/konfig-dev/splitit-web-php-guzzle6-sdk.git"
}
],
"