mata therenne na ai oya me form vairables server side eken redirect karanne kiyala methana credit card wisthara monawath na . nikam amount ekak witharai thiyenne payhere egollonge server (SITE) ekedi thama credit card info type karanna kiyanne. oyata me form auto submit karanna puluwan oyage route ekak athule view eke hadala javascript walin

<form id="myForm" action="Page_C.php" method="post">
<?php
foreach ($_POST as $a => $b) {
echo '<input type="hidden" name="'.htmlentities($a).'" value="'.htmlentities($b).'">';
}
?>
</form>
<script type="text/javascript">
document.getElementById('myForm').submit();
</script>

@root
me kiyanne checkout karaddi (<form method="post" action="https://sandbox.payhere.lk/pay/checkout"> form eka submit karaddi)
eke form entities wenama pahala thawa route ekakin java script walin submit karala e form data wenama database update karaganna kiyala neda.