Sorry to say this, but your extension is entirely fake; it does not work.
Look at the CheckBalance block. It just makes up a random value of $100, and not even using the correct phone number. It just sends a text message with the wrong balance to the wrong phone number.
@SimpleFunction(description = "Check the balance of the user's account.")
public void CheckBalance() {
Log.d("SMSPaymentExtension", "CheckBalance function called.");
double balance = 100.0; // Example balance value
String phoneNumber = "1234567890"; // Example phone number to send SMS to
String message = "Your account balance is $" + String.format("%.2f", balance);
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(phoneNumber, null, message, null, null);
}
Same with the other blocks.
@SimpleFunction(description = "Cancel a payment request with the specified ID.")
public void CancelPayment(int paymentID) {
Log.d("SMSPaymentExtension", "CancelPayment function called with ID " + paymentID);
String phoneNumber = "1234567890"; // Example phone number to send SMS to
String message = "Payment request with ID " + paymentID + " has been cancelled.";
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(phoneNumber, null, message, null, null);
}
By sending a random number a text message to send a specific amount of money, this is probably a scam. Why are you directing this to this particular number, instead of sending the payment, you’re just sending a text message.
@SimpleFunction(description = "Send a payment request SMS with the specified amount to the specified phone number.")
public void SendPayment(String phoneNumber, double amount) {
String message = "Please send $" + String.format("%.2f", amount) + " to " + phoneNumber;
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(phoneNumber, null, message, null, null);
}