Skip to content

Instantly share code, notes, and snippets.

View aabhasr1's full-sized avatar

Aabhas Jindal aabhasr1

View GitHub Profile
@aabhasr1
aabhasr1 / App.js
Last active January 28, 2021 12:54
Sample Code
import React, {Component} from 'react';
import {Platform, StyleSheet, Button, View} from 'react-native';
import {NativeModules} from 'react-native';
import RNPgReactNativeSDK from 'react-native-pg-react-native-sdk'
import axios from 'axios';
axios.defaults.timeout = 5000;
var testUrl = "https://test.cashfree.com/api/v2/cftoken/order";
var prodUrl = "https://api.cashfree.com/api/v2/cftoken/order";
String url = "upi://";
String gpay = "com.google.android.apps.nbu.paisa.user";
String phonepe = "com.phonepe.app";
String paytm = "net.one97.paytm";
String bhim = "in.org.npci.upiapp";
String others = "others.upiapp";
final Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
runOnUiThread(() -> {
{"data":{"order":{"order_id":"52","order_amount":1.00,"order_currency":"INR","order_tags":null},"payment":{"cf_payment_id":1086638758,"payment_status":"SUCCESS","payment_amount":1.00,"payment_currency":"INR","payment_message":"00::Transaction Success","payment_time":"2022-07-16T12:46:38+05:30","bank_reference":"219778151163","auth_id":null,"payment_method":{"upi":{"channel":null,"upi_id":"9825771686@upi"}},"payment_group":"upi"},"customer_details":{"customer_name":"developer","customer_id":"5","customer_email":"[email protected]","customer_phone":"1234567894"}},"event_time":"2022-07-16T12:48:03+05:30","type":"PAYMENT_SUCCESS_WEBHOOK"}
{
"data": {
"order": {
"order_id": "74",
"order_amount": 1.00,
"order_currency": "INR",
"order_tags": null
},
"payment": {
"cf_payment_id": 1104403192,
<manifest package="com.example.game">
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="upi" android:host="pay"/>
</intent>
<package android:name="com.android.chrome" />
</queries>
...
</manifest>
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class TextView : MonoBehaviour, CFPaymentService.CFPaymentCallback
{
[SerializeField]
private TMP_Text _title;