Skip to content

Commit

Permalink
Merge branch 'dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
hpakdaman authored Feb 8, 2018
2 parents ace2558 + 9ada776 commit 880f0a5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,22 @@ You can make connection to bank by several way (Facade , Service container):
try {
$gateway = \Gateway::make(new \Mellat());
// $gateway->setCallback(url('/path/to/calback/route')); You can also change the callback

// $gateway->setCallback(url('/path/to/callback/route')); You can also change the callback
$gateway
->price(1000)
// setShipmentPrice(10) // optional - just for paypal
// setProductName("My Product") // optional - just for paypal
->ready();

$refId = $gateway->refId();
$transID = $gateway->transactionId();

// Your code here

return $gateway->redirect();
} catch (Exception $e) {
} catch (\Exception $e) {
echo $e->getMessage();
}
Expand All @@ -97,7 +99,7 @@ and in your callback :
// Your code here
} catch (Exception $e) {
} catch (\Exception $e) {
echo $e->getMessage();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ public function up()
*/
public function down()
{
// Don't check for foreign key constraints when executing below query in current session
DB::statement('set foreign_key_checks=0');

DB::statement("ALTER TABLE `" . $this->getTable() . "` CHANGE `id` `id` INT(10) UNSIGNED NOT NULL;");

// Ok! now DBMS can check for foregin key constraints
DB::statement('set foreign_key_checks=1');

}
}
2 changes: 1 addition & 1 deletion src/Pasargad/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static function makeXMLTree($data)
}
}

return $ret['resultObj'];
return $ret ;
}


Expand Down
1 change: 1 addition & 0 deletions src/Pasargad/Pasargad.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,5 @@ protected function verifyPayment()
$this->transactionFailed();
throw new PasargadErrorException(Enum::TRANSACTION_FAILED_TEXT, -1);
}
}
}

0 comments on commit 880f0a5

Please sign in to comment.