简体   繁体   中英

CCAvenue PHP Integration with Form

Need help in technical implementation. Currently we have on our website drop down list to select product and then click on pay now using Paypal.

Want to implement similar in CCAvenue. Kindly advise ( created a product on ccAvenue console and got the product ID). Looked at CCAvenue documentation but didn't find any implementation similar to this.

Example of current paypal implementation

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XXXXXX">
<table>
<tr><td><input type="hidden" name="on0" value="test">test</td></tr><tr><td><select name="os0">
<option value="Option1"> $60.00 USD</option>
<option value="Option2">$160.00 USD</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypalobjects.com/en_GB/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>

After Creation of account in ccavenue, you can get shopcart values, currency and valid url through which you can post this. Below is sample code for reference

        <form name="linkForm" method="POST" action="" id="form">
          <select name="mydropdown" class="styled" onchange="document.getElementById('form').setAttribute('action', this.value); document.linkForm.submit(); ">
            <option value="https://secure.ccavenue.com/transaction/txn/shopcart/XXX,XXX,INR,http://yoururl.com">Select Option</option>
            <option value="https://secure.ccavenue.com/transaction/txn/shopcart/
    YYY,YYYY,INR,http://yoururl.com">Option 1</option>
           <option value="https://secure.ccavenue.com/transaction/txn/shopcart/
    YYY,YYYY,INR,http://yoururl.com">Option 2</option>
<option value="https://secure.ccavenue.com/transaction/txn/shopcart/
    YYY,YYYY,INR,http://yoururl.com">Option 3</option>
          </select>
        </form>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM