Skip to content

Commit

Permalink
Merge pull request #12 from OnurFICICI/patch-7
Browse files Browse the repository at this point in the history
Update purchase.php
  • Loading branch information
yasinkuyu authored Jan 19, 2019
2 parents d2e9418 + 028fbd9 commit 238bc1c
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion samples/purchase.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,31 @@
$gateway->setMerchantUser('test@yasinkuyu.net');
$gateway->setMerchantPassword('Paratika123');
$gateway->setSecretKey('QOClasdJUuDDWasdasdasd');
$gateway->setBank('ISBANK');

$gateway->setBin("545616");
$gateway->setMode("api");
try {
$cardNetwork = 'UNKNOWN';
$options = [
'queryAction' => 'QUERYBIN'
];

$response = $gateway->query($options)->send();
if ($response->isSuccessful()) {
$details = $response->getQueryDetails();
if($details['responseCode'] = "00"){
$cardNetwork = $details['bin']['cardNetwork'];
}

} else {
exit($response->getMessage());
}


} catch (\Exception $e) {
echo $e->getMessage();
}
$gateway->setBank($cardNetwork);

$gateway->setMode("NonDirectPost3D");
//Diğer paremetreler: api DirectPost3D NonDirectPost3D
Expand Down

0 comments on commit 238bc1c

Please sign in to comment.