Skip to content

Commit

Permalink
Merge pull request #6 from unitpay/cashbox_support
Browse files Browse the repository at this point in the history
Added cashboxes support
  • Loading branch information
2Garin authored Jul 7, 2020
2 parents 626b21d + 85614af commit 24613a8
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions unitpay/unitpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,29 @@ public function generate_form($order_id){
$this->secret_key
)));

return
$form =
'<form action="https://' . $this->domain . '/pay/' . $this->public_key . '" method="POST" id="unitpay_form">'.
'<input type="hidden" name="sum" value="' . $sum . '" />'.
'<input type="hidden" name="account" value="' . $account . '" />'.
'<input type="hidden" name="desc" value="' . $desc . '" />'.
'<input type="hidden" name="currency" value="' . $currency . '" />'.
'<input type="hidden" name="locale" value="' . $locale . '" />'.
'<input type="hidden" name="signature" value="' . $signature . '" />'.
'<input type="hidden" name="signature" value="' . $signature . '" />';

if ($order->billing_email) {
$form .= '<input type="hidden" name="customerEmail" value="' . $order->billing_email . '" />';
}

if ($order->billing_phone) {
$form .= '<input type="hidden" name="customerPhone" value="' . $order->billing_phone . '" />';
}

$form .=
'<input type="submit" class="button alt" id="submit_unitpay_form" value="'.__('Pay', 'unitpay').'" />
<a class="button cancel" href="'.$order->get_cancel_order_url().'">'.__('Cancel payment and return back to card', 'unitpay').'</a>'."\n".
'</form>';

return $form;
}

/**
Expand Down

0 comments on commit 24613a8

Please sign in to comment.