How to pass total amount with order details in payeezy demo payment gateway

1k views Asked by At

I have integrated payeezy payment gateway for one of my e-commerce site. I can easily pass the order details with price and quantity but not able to pass the total amount for the order details.

Here is the code which I am using---->

<form action="https://demo.globalgatewaye4.firstdata.com/pay" id="pay_now_form_1dcc971562" method="post">
        <input name="x_login" type="hidden" value="XXX-XXXX-xxxxxxxxxx" />
        <input name="x_show_form" type="hidden" value="PAYMENT_FORM" />
        <input name="x_fp_sequence" type="hidden" value="14605299651823126780" />
        <input name="x_fp_hash" type="hidden" value="PNB-1.0-eba46929895e57fc4254e9ef11cdbcbcf647334c" />
        <input name="x_amount" type="hidden" />
        <input name="x_currency_code" type="hidden" value="USD" />
        <input name="x_test_request" type="hidden" value="TRUE" />
        <input name="x_relay_response" type="hidden" value="" />
        <input name="donation_prompt" type="hidden" />
        <input name="button_code" type="hidden" value="Pay Now mySite" />
        <?php 
        foreach ($_SESSION["cart_item"] as $item) {
            ?>
        <input name="x_line_item" value="1<|><?php echo $item['title']; ?><|><?php echo $item['title']; ?><|>1<|><?php echo $item['price']; ?><|>YES" type="hidden"> 
        <?php 
        } ?>
        <div class="cpwrap">
            <button type="button" >Pay Now</button>
        </div>
    </form>

If do I pass the value in <input name="x_amount" type="hidden" value="99"/>

then I am getting error "Unable to proceed with payment " in the paymant gateway.

So how to resolve this issue. Please do some needful.

Thanks in advance.

with regards, Sudhir

1

There are 1 answers

0
Sudhir Koimattur On BEST ANSWER

yes.. Finally after doing lot of research on payeezy got this link

Here is the code how to integrate payeezy with PHP with dynamic order details and total amount.