Search code examples
phplaravel-5worldpay

how to send the additional parameters in worldpay form?


I am getting the response but i have not get the additional parameters that i have added in our form i have added the startDate and expiryDate but i am not getting these keys in response. Plaese hep me how to do that i am using laravel 5.2 framework here is my code:-

<form action="https://secure-test.worldpay.com/wcc/purchase" method="POST" name="worldpayForm" id="worldpayForm">

<input type="hidden" name="testMode" value="100">
<input type="hidden" name="instId" value="myinstid">
<input type="hidden" name="cartId" value="1">
<input type="hidden" name="amount" value="1000">
<input type="hidden" name="currency" value="GBP">
//theses are below  my additional parameters
<input type="hidden" name="startDate" value="2017-04-23">
<input type="hidden" name="expiryDate" value="2017-07-23">

<input type=submit value=" Buy This ">
</form>

Here is my laravel fuction to get response:

public function thanks(){
    $data = $_REQUEST;
    echo '<pre>'; print_r($_REQUEST); die;
}

Thanks in advance :)


Solution

  • Finally Find the solution of my own after seraching Here i have to do only this :-

    <input type="hidden" name="M_startDate" value="2017-04-23">
    the additional parameter name should be like this 
    

    Hope it help for other in future.