Skip to content

Instantly share code, notes, and snippets.

@shankhadevpadam
Created June 22, 2021 06:18
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 shankhadevpadam/49bd9473a272203af60ac1594852466a to your computer and use it in GitHub Desktop.
Save shankhadevpadam/49bd9473a272203af60ac1594852466a to your computer and use it in GitHub Desktop.
<form id="frm-nicasia" action="{{ config('payment.gateways.nicasia.test.transaction_url') }}" method="post" enctype="multipart/form-data">
<input type="hidden" name="profile_id" value="{{ config('payment.gateways.nicasia.test.profile_id') }}">
<input type="hidden" name="transaction_uuid" value="{{ Str::uuid() }}">
<input type="hidden" name="signed_field_names" value="access_key,profile_id,transaction_uuid,signed_field_names,unsigned_field_names,signed_date_time,locale,transaction_type,reference_number,amount,currency,payment_method,bill_to_forename,bill_to_surname,bill_to_email,bill_to_phone,bill_to_address_line1,bill_to_address_city,bill_to_address_state,bill_to_address_country,bill_to_address_postal_code">
<input type="hidden" name="unsigned_field_names" value="card_type,card_number,card_expiry_date">
<input type="hidden" name="signed_date_time" value="{{ now() }}">
<input type="hidden" name="locale" value="en">
<input type="hidden" name="amount" value="1">
<input type="hidden" name="bill_to_forename" value="Test">
<input type="hidden" name="bill_to_surname" value="Test">
<input type="hidden" name="bill_to_email" value="test@gmail.com">
<input type="hidden" name="bill_to_phone" value="9841111111">
<input type="hidden" name="bill_to_address_line1" value="Test">
<input type="hidden" name="bill_to_address_city" value="Test">
<input type="hidden" name="bill_to_address_state" value="Test">
<input type="hidden" name="bill_to_address_country" value="Nepal">
<input type="hidden" name="bill_to_address_postal_code" value="44600">
<input type="hidden" name="transaction_type" value="sale">
<input type="hidden" name="reference_number" value="ref_2021">
<input type="hidden" name="currency" value="USD">
<input type="hidden" name="payment_method" value="card">
<input type="hidden" name="signature" value="{{ $hash }}">
<input type="hidden" name="card_type" vlaue="card_type">
<input type="hidden" name="card_number" value="4622943127013705">
<input type="hidden" name="card_expiry_date" value="12/22">
<input type="hidden" name="access_key" value="{{ config('payment.gateways.nicasia.test.access_key') }}">
</form>
<script>
window.onload = () => {
document.querySelector('#frm-nicasia').submit();
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment