Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after switching to live key #47

Open
mopilo opened this issue Oct 11, 2020 · 16 comments
Open

Error after switching to live key #47

mopilo opened this issue Oct 11, 2020 · 16 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@mopilo
Copy link

mopilo commented Oct 11, 2020

RaveResult{status: RaveStatus.error, rawResponse: null, message: ER_CANT_AGGREGATE_2COLLATIONS: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='}

how can I solve this?

@mopilo
Copy link
Author

mopilo commented Oct 30, 2020

@Wilburt

@mopilo
Copy link
Author

mopilo commented Oct 30, 2020

this happens when stage is false

@wilburx9
Copy link
Owner

"ER_CANT_AGGREGATE_2COLLATIONS" sounds like an error from MariaDB. I believe this is coming from Rave backend.

@mopilo
Copy link
Author

mopilo commented Oct 30, 2020

Yea, seems rave updated their url to version 3, please can you check that?

@mopilo
Copy link
Author

mopilo commented Oct 30, 2020

@Wilburt

@wilburx9
Copy link
Owner

wilburx9 commented Nov 1, 2020

Yea, seems rave updated their url to version 3, please can you check that?

Please, where did you get this information?

@wilburx9 wilburx9 added the help wanted Extra attention is needed label Nov 1, 2020
@wilburx9 wilburx9 self-assigned this Nov 1, 2020
@mopilo
Copy link
Author

mopilo commented Nov 1, 2020

Yea, seems rave updated their url to version 3, please can you check that?

Please, where did you get this information?

Flutterwave has a new plugin for flutter and has information about the new url version. the plugin is buggy and not as clean as urs. https://pub.dev/packages/flutterwave

@wilburx9
Copy link
Owner

wilburx9 commented Nov 1, 2020

Do you mean this "https://api.ravepay.co/v3/sdkcheckout/"? I can't seem to find any public information about it.

@mopilo
Copy link
Author

mopilo commented Nov 1, 2020

Do you mean this "https://api.ravepay.co/v3/sdkcheckout/"? I can't seem to find any public information about it.

Yes. the new url it requires authorization bearer to be public or secret key. Please were you able to replicate the error I had?

@wilburx9
Copy link
Owner

wilburx9 commented Nov 1, 2020

No, I didn't. I no longer have access to live keys. Please, can you send paste the construction of the Charge object?

@mopilo
Copy link
Author

mopilo commented Nov 1, 2020

for this https://pub.dev/packages/flutterwave ?

@wilburx9
Copy link
Owner

wilburx9 commented Nov 1, 2020

Nope, for this package.

@mopilo
Copy link
Author

mopilo commented Nov 1, 2020

static final String basePath = "/flwv3-pug/getpaidx/api";
final String _chargeEndpoint = "$basePath/charge";

Future charge(ChargeRequestBody body) async {
try {
final response = await this
._httpService
.dio
.post(_chargeEndpoint, data: body.toJson());
return ChargeResponseModel.fromJson(response.data);
} on DioError catch (e) {
throw RaveException(data: e?.response?.data);
} catch (e) {
throw RaveException();
}
}

class ChargeResponseModel extends Equatable {
final String status;
final String message;
final String validateInstructions;
final String validateInstruction;
final String suggestedAuth;
final String chargeResponseCode;
final String authModelUsed;
final String flwRef;
final String txRef;
final String chargeResponseMessage;
final String authUrl;
final String appFee;
final String currency;
final String chargedAmount;
final String redirectUrl;
final bool hasData;
final Map rawResponse;

ChargeResponseModel({
@required this.status,
@required this.message,
@required this.validateInstructions,
@required this.suggestedAuth,
@required this.chargeResponseCode,
@required this.authModelUsed,
@required this.flwRef,
@required this.txRef,
@required this.chargeResponseMessage,
@required this.authUrl,
@required this.appFee,
@required this.currency,
@required this.chargedAmount,
@required this.redirectUrl,
@required this.hasData,
@required this.rawResponse,
@required this.validateInstruction,
});

factory ChargeResponseModel.fromJson(Map<String, dynamic> json) {
Map<String, dynamic> data = json["data"] ?? {};
return ChargeResponseModel(
status: json["status"],
message: json["message"],
hasData: data.isNotEmpty,
suggestedAuth: data["suggested_auth"],
chargeResponseCode: data["chargeResponseCode"],
authModelUsed: data["authModelUsed"],
flwRef: data["flwRef"],
validateInstruction: data["validateInstruction"],
validateInstructions: data.containsKey("validateInstructions")
? data["validateInstructions"]["instruction"]
: null,
txRef: data["txRef"],
chargeResponseMessage: data["chargeResponseMessage"],
authUrl: data["authurl"],
appFee: data["appFee"],
currency: data["currency"],
chargedAmount: data["charged_amount"].toString(),
redirectUrl: data["redirectUrl"],
rawResponse: json);
}

Map<String, dynamic> toJson() => rawResponse;

@OverRide
List get props => [
status,
message,
validateInstructions,
validateInstruction,
suggestedAuth,
chargeResponseCode,
authModelUsed,
flwRef,
chargeResponseMessage,
authUrl,
appFee,
currency,
chargedAmount,
redirectUrl,
hasData,
];
}

@wilburx9
Copy link
Owner

wilburx9 commented Nov 2, 2020

I actually asked for the way you're calling this plugin to make the payment.

However, I am currently in a conversation with Flutterwave on this issue and I will revert when I have more information.

@mopilo
Copy link
Author

mopilo commented Nov 2, 2020

I actually asked for the way you're calling this plugin to make the payment.

However, I am currently in a conversation with Flutterwave on this issue and I will revert when I have more information.

okay, I'm calling it the same way you did from the example project. the only difference is the ..staging which false, and the test keys were changed to live keys

@mopilo
Copy link
Author

mopilo commented Nov 5, 2020

any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants