Skip to content

Commit

Permalink
Added hashing to the generated payment session id.
Browse files Browse the repository at this point in the history
  • Loading branch information
victorybiz committed Aug 22, 2021
1 parent 48a9ac6 commit 293ab4a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 1 deletion.
Binary file modified .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
* return true;
* }
*
* Example: [\Victorybiz\LaravelCryptoPaymentGateway\Http\Controllers\CryptoPaymentController::class, 'ipn']
* Example 1: [\Victorybiz\LaravelCryptoPaymentGateway\Http\Controllers\CryptoPaymentController::class, 'ipn']
* Example 2: [App\Http\Controllers\Payment\PaymentController::class, 'ipn']
*/
'hook_ipn' => [],

Expand Down
Binary file modified resources/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions src/LaravelCryptoPaymentGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public static function callback()
public static function startPaymentSession($options)
{
$payment_session_id = \Illuminate\Support\Str::uuid()->toString();
$payment_session_id = hash("sha512", $payment_session_id);
// save to session
session(["paymentbox_{$payment_session_id}" => $options]);

Expand Down

0 comments on commit 293ab4a

Please sign in to comment.