Skip to content

Instantly share code, notes, and snippets.

@tiagomatos
Created June 12, 2020 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiagomatos/e753b5ea3ed9b291245f919763e63054 to your computer and use it in GitHub Desktop.
Save tiagomatos/e753b5ea3ed9b291245f919763e63054 to your computer and use it in GitHub Desktop.
External Payment Gateway Integration in PHP
public function dataJumpseller(Request $data)
{
$secretKey = "secreto_jumpseller";
$params = array( "x_account_id" => "223504", "x_amount" => "123.0", "x_currency" => "EUR", "x_reference" => "1001", , x_result: "completed", x_timestamp: '2014-03-24T12:15:41Z', "x_message" => "\\nProducto:\\n1 x Energise EDT 125 ML: 29.500 EUR\\nImpuesto: €6.785,00" );
$keys = array_keys($params);
sort($keys);
$toSign = "";
foreach ($keys as $key) { $toSign .= $key . $params[$key]; }
$sign = hash_hmac('sha256', $toSign, $secretKey);
return $sign;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment