|
@@ -85,8 +85,8 @@ discard block |
|
|
block discarded – undo |
|
85
|
85
|
|
|
86
|
86
|
|
|
87
|
87
|
///// <-- This code simulates generation of a signature by the server, DO NOT USE IN PROD |
|
88
|
|
-$signString = getAuthKey() . ":" . getAuthSecret() . ":" . $callback_test['sign']['time']; |
|
89
|
|
-$callback_test['sign']['hash'] = password_hash($signString, PASSWORD_BCRYPT); |
|
|
88
|
+$signString = getAuthKey() . ":" . getAuthSecret() . ":" . $callback_test[ 'sign' ][ 'time' ]; |
|
|
89
|
+$callback_test[ 'sign' ][ 'hash' ] = password_hash($signString, PASSWORD_BCRYPT); |
|
90
|
90
|
///// END --> |
|
91
|
91
|
|
|
92
|
92
|
|
|
@@ -108,7 +108,7 @@ discard block |
|
|
block discarded – undo |
|
108
|
108
|
true // sandbox |
|
109
|
109
|
); |
|
110
|
110
|
|
|
111
|
|
-$verify_sign = $provider->verifySign($callback['sign']['time'], $callback['sign']['hash']); |
|
|
111
|
+$verify_sign = $provider->verifySign($callback[ 'sign' ][ 'time' ], $callback[ 'sign' ][ 'hash' ]); |
|
112
|
112
|
|
|
113
|
113
|
// A signature for each callback is generated every time a new one, a unique signature must be verified |
|
114
|
114
|
if (!$verify_sign) { |
|
@@ -120,7 +120,7 @@ discard block |
|
|
block discarded – undo |
|
120
|
120
|
// IMPORTANT! Callback can be sent again, you should be prepared for this case and not add the transaction again |
|
121
|
121
|
|
|
122
|
122
|
// If this is a callback to withdrawal |
|
123
|
|
-if (!empty($callback['virtual_wallet_id'])) { |
|
|
123
|
+if (!empty($callback[ 'virtual_wallet_id' ])) { |
|
124
|
124
|
// $hash = $callback['transaction']; |
|
125
|
125
|
// ... |
|
126
|
126
|
|
Please login to merge, or discard this patch.