All URIs are relative to https://virtserver.swaggerhub.com/gitdevstar/Algocash/1.0.0
Method | HTTP request | Description |
---|---|---|
createDeposit | POST /payin | create a deposit |
\Algocash\Model\DepositResponse createDeposit($body)
create a deposit
create a deposit
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$algo = Algocash::getInstance()
->setApiKey('merchant_key', 'merchant_secret')
->setAccessToken('api_access_token');
// ->enableProdMode(false); // default prod mode
$apiInstance = new DepositApi($algo);
$payer = new Payer("email", "phone");
$url = new Url("callback_url", "pending_url", "success_url", "error_url");
$body = new DepositRequest("invioceId", "amount", $payer, $url, "payment method");
try {
$result = $apiInstance->createDeposit($body);
print_r($result);
} catch (\Algocash\ApiException $e) {
echo 'Api Exception when calling DepositApi->createDeposit: ', json_encode($e->getError()), PHP_EOL;
} catch (\Exception $e) {
echo 'Exception when calling DepositApi->createDeposit: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Algocash\Model\DepositRequest | Deposit request body |
\Algocash\Model\DepositResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]