1. Go to this page and download the library: Download misavan/boipa_php_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/ */
misavan / boipa_php_sdk example snippets
$payments = (new Payments())->testEnvironment(array(
‘merchantId’ => ‘42’,
‘password’ => ‘mypassword’));
$payments = (new Payments())->productionEnvironment()->
merchantId(‘42’)->
password(‘mypassword’);
$newPurchase = $payments->purchase()->
number(‘42’)->
nameOnCard(‘Alice’)->
..<and so on>;
try {
$myRequest->execute(function($res) {
// do something with $res
});
} catch(Payments/PaymentsException e) {
// something went wrong, did you configure your request properly?
}
try {
$res = $myRequest->execute();
// do something with $res
} catch(Payments/PaymentsException e) {
// something went wrong, did you configure your request properly?
}
try {
// without a callback
$myPurchaseResult = $myPurchase->execute();
// or with a callback
$myPuchase->execute(function($res) {
// do something here
});
} catch(Payments/Exception e) {
// don’t forget to check for errors!
}
$myObject = $myObject->
myParamA(‘valueA’)->
myParamB(‘valueB’)->
myParamC(‘valueC’)->
myParamD(‘valueD’)->
… and so on for as long as you like … ;
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.