PHP code example of apruvd / php_sdk_v4
1. Go to this page and download the library: Download apruvd/php_sdk_v4 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/ */
apruvd / php_sdk_v4 example snippets
$token = $service->createMerchantRefreshToken();
$service->onAccessTokenUpdate(function($token){ ... });
$token = $service->createMerchantAccessToken();
$transaction = new Transaction([
"order_id" => "Trans".time(),
"discount_codes" => [
new DiscountCode([
'description' => 'description'
]);
],
"cart_contents" => [
new CartContent([
'product' => new Product([
'unique_id' => 'Product'.time(),
'product_type' => 'Physical',
'category' => 'Foo',
]),
'quantity' => 10,
'unit_price' => 5.21,
'is_gift' => false,
'gift_message' => 'gift '.time()
])
]
]);
$response = $service->createTransaction($transaction);
$response->code
$response->detail
$response->success
$response->validation_errors
$response->response
accounts/merchants/{$id}/
accounts/webhooks/api_keys/{$id}/
accounts/webhooks/api_keys/{$id}/
accounts/webhooks/api_keys/{$id}/
accounts/webhooks/api_keys/{$id}/
accounts/webhooks/{$id}/
accounts/webhooks/{$id}/
accounts/webhooks/{$id}/
accounts/webhooks/{$id}/