You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const handlePayment = () => {
// Replace 'your-api-key' with your actual PhonePe API key
const apiKey = "0bc9343c-7350-4439-a640-ff51f5b7f88b";
const transactionId = transactionUniqueId;
console.log(window.PhonePe.init);
// Ensure the PhonePe script is loaded
if (window.PhonePe) {
// Initialize PhonePe SDK
window.PhonePe.init({
clientId: apiKey,
orderId: transactionId,
amount: 100, // Replace with your actual amount
returnUrl: window.location.href,
paymentModes: ["UPI", "DEBIT_CARD", "CREDIT_CARD", "WALLET"],
intent: "ORDER",
});
// Generate the PhonePe payment button
window.PhonePe.setButton({
id: "phonepe-checkout-button",
preAuth: false,
});
// Open the PhonePe checkout when the button is clicked
window.PhonePe.open();
} else {
console.error(
"PhonePe SDK is not available. Make sure the script is loaded."
);
}
};
The text was updated successfully, but these errors were encountered:
const handlePayment = () => {
// Replace 'your-api-key' with your actual PhonePe API key
const apiKey = "0bc9343c-7350-4439-a640-ff51f5b7f88b";
console.log(window.PhonePe.init);
// Ensure the PhonePe script is loaded
if (window.PhonePe) {
// Initialize PhonePe SDK
window.PhonePe.init({
clientId: apiKey,
orderId: transactionId,
amount: 100, // Replace with your actual amount
returnUrl: window.location.href,
paymentModes: ["UPI", "DEBIT_CARD", "CREDIT_CARD", "WALLET"],
intent: "ORDER",
});
};
The text was updated successfully, but these errors were encountered: