agile_pay_state_info.dart 707 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import '../listener/agile_pay_state.dart';
  2. abstract class AgilePayStateInfo {
  3. AgilePayState? mPay;
  4. void sendError(int errno, String? error) {
  5. if (mPay != null) {
  6. mPay?.error(errno, error);
  7. }
  8. }
  9. void sendPaySuccess(String? result) {
  10. if (mPay != null) {
  11. mPay?.paySuccess(result);
  12. }
  13. }
  14. void sendPayError(int errno, String? error) {
  15. if (mPay != null) {
  16. mPay?.payError(errno, error);
  17. }
  18. }
  19. void sendRestoreSuccess(String? result) {
  20. if (mPay != null) {
  21. mPay?.restoreSuccess(result);
  22. }
  23. }
  24. void sendPayBefore() {
  25. if (mPay != null) {
  26. mPay?.payBefore();
  27. }
  28. }
  29. void setPayListener(AgilePayState pay) {
  30. mPay = pay;
  31. }
  32. }