This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include'config/db.php'; // Your database connection file if needed | |
$status=$_POST["status"]; | |
$firstname=$_POST["firstname"]; | |
$amount=$_POST["amount"]; | |
$txnid=$_POST["txnid"]; | |
$posted_hash=$_POST["hash"]; | |
$key=$_POST["key"]; | |
$productinfo=$_POST["productinfo"]; | |
$email=$_POST["email"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String hashSequence = merchantKey + "|" + txnId + "|" + amount + "|" + productInfo + "|" + firstName + "|" + email + "|" + | |
udf1 + "|" + udf2 + "|" + udf3 + "|" + udf4 + "|" + udf5 + "|" + "|" + "|" + "|" + "|" + "|" + salt; | |
public static String hashCal(String type, String hashString) { | |
StringBuilder hash = new StringBuilder(); | |
MessageDigest messageDigest = null; | |
try { | |
messageDigest = MessageDigest.getInstance(type); | |
messageDigest.update(hashString.getBytes()); | |
byte[] mdbytes = messageDigest.digest(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style name="PaymentAppTheme"> | |
<item name="colorPrimary">@color/colorPrimary</item> | |
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> | |
<item name="colorAccent">@color/colorAccent</item> | |
<item name="colorButtonNormal">@color/primary_green</item> | |
<item name="alertDialogTheme">@style/AlertDialogStyle_Default</item> | |
<item name="actionMenuTextColor">@color/white</item> | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PaymentActivity : AppCompatActivity(){ | |
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { | |
super.onActivityResult(requestCode, resultCode, data) | |
// Result Code is -1 send from Payumoney activity | |
log(D, "request code $requestCode resultcode $resultCode") | |
if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT | |
&& resultCode == Activity.RESULT_OK && data != null) { | |
val transactionResponse = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PaymentActivity : AppCompatActivity() { | |
private val builder = PayUmoneySdkInitializer.PaymentParam.Builder() | |
var paymentParam: PayUmoneySdkInitializer.PaymentParam? = null | |
val merchantID = "6392590" | |
private fun startPay( | |
amount: String, txnid: String, phoneNumber: String, | |
productinfo: String, name: String, email: String, udf1: String, udf2: String, | |
udf3: String, udf4: String, udf5: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
const functions = require("firebase-functions"); | |
const admin = require("firebase-admin"); | |
admin.initializeApp(); | |
exports.getHash = functions.https.onRequest(async (request, response) => { | |
const merchantKey = "oVWDEmPK"; | |
const salt = "cdrcf1cyTj"; | |
const txnId = request.query.txnId; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun startCamera() { | |
... | |
// Add this before CameraX.bindToLifecycle | |
// Setup image analysis pipeline that computes average pixel luminance | |
val analyzerConfig = ImageAnalysisConfig.Builder().apply { | |
// Use a worker thread for image analysis to prevent glitches | |
val analyzerThread = HandlerThread( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class LuminosityAnalyzer : ImageAnalysis.Analyzer { | |
private var lastAnalyzedTimestamp = 0L | |
/** | |
* Helper extension function used to extract a byte array from an | |
* image plane buffer | |
*/ | |
private fun ByteBuffer.toByteArray(): ByteArray { | |
rewind() // Rewind the buffer to zero | |
val data = ByteArray(remaining()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun startCamera() { | |
... | |
// Add this before CameraX.bindToLifecycle | |
// Create configuration object for the image capture use case | |
val imageCaptureConfig = ImageCaptureConfig.Builder() | |
.apply { | |
setTargetAspectRatio(Rational(1, 1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ImageButton | |
android:id="@+id/capture_button" | |
android:layout_width="72dp" | |
android:layout_height="72dp" | |
android:layout_margin="24dp" | |
app:srcCompat="@android:drawable/ic_menu_camera" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintStart_toStartOf="parent" /> |
NewerOlder