File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,6 +103,13 @@ public function generate_form($order_id){
103103 $ currency = $ order ->get_order_currency ();
104104 $ cur_locale = get_locale ();
105105 $ locale = $ cur_locale == 'ru_RU ' ?'ru ' :'en ' ;
106+ $ signature = hash ('sha256 ' , join ('{up} ' , array (
107+ $ account ,
108+ $ currency ,
109+ $ desc ,
110+ $ sum ,
111+ $ this ->secret_key
112+ )));
106113
107114 return
108115 '<form action="https://unitpay.ru/pay/ ' . $ this ->public_key . '" method="POST" id="unitpay_form"> ' .
@@ -111,6 +118,7 @@ public function generate_form($order_id){
111118 '<input type="hidden" name="desc" value=" ' . $ desc . '" /> ' .
112119 '<input type="hidden" name="currency" value=" ' . $ currency . '" /> ' .
113120 '<input type="hidden" name="locale" value=" ' . $ locale . '" /> ' .
121+ '<input type="hidden" name="signature" value=" ' . $ signature . '" /> ' .
114122 '<input type="submit" class="button alt" id="submit_unitpay_form" value=" ' .__ ('Pay ' , 'unitpay ' ).'" />
115123 <a class="button cancel" href=" ' .$ order ->get_cancel_order_url ().'"> ' .__ ('Cancel payment and return back to card ' , 'unitpay ' ).'</a> ' ."\n" .
116124 '</form> ' ;
You can’t perform that action at this time.
0 commit comments