Skip to content

Instantly share code, notes, and snippets.

@basilcf
basilcf / popup.html
Last active November 14, 2018 06:19
Code Example for Merchant Hosted Cashfree Popup payment page (https://docs.cashfree.com/docs/hosted/guide/#popup-mode)
<!-- Place the below div on your html -->
<div id="payment-div"></div>
<!-- Paste below code base before the closing tag(</body>) of body element -->
<script src="https://www.cashfree.com/assets/cashfree.sdk.v1.2.js" type="text/javascript"></script>
<script type="text/javascript">
(function() {
var data = {};
data.orderId = "1234";
data.orderAmount = 450;
@basilcf
basilcf / inline.html
Last active November 14, 2018 06:19
Code Example for Merchant Hosted Cashfree Inline Payment page (https://docs.cashfree.com/docs/hosted/guide/#inline-mode)
<!-- Place the below div on your html -->
<div id="payment-div"></div>
<!-- Paste below code base before the closing tag(</body>) of body element -->
<script src="https://www.cashfree.com/assets/cashfree.sdk.v1.2.js" type="text/javascript"></script>
<script type="text/javascript">
(function() {
var data = {};
data.orderId = "1234";
data.orderAmount = 450;
@basilcf
basilcf / seamless-basic-popup.php
Last active October 23, 2018 11:55
Cashfree Seamless Basic Popup payment page Sample Code
<?php
$mode = "TEST";
$appId = "<API KEY>";
$secretKey = "<Secret Key>";
$orderId = time();
$orderAmount = 100;
$customerName = "John Doe";
$customerPhone = "9900012345";
@basilcf
basilcf / seamless-basic-redirect.php
Last active October 23, 2018 11:55
Cashfree Seamless Basic redirect payment page sample Code
<?php
$mode = "TEST";
$appId = "<API KEY>";
$secretKey = "<Secret Key>";
$orderId = time();
$orderAmount = 100;
$customerName = "John Doe";
$customerPhone = "9900012345";