wilburx9 / rave_flutter

A Flutter plugin for Flutterwaves's rave.
Apache License 2.0
31 stars 58 forks source link

Wrong public Key error #34

Closed drosarl closed 4 years ago

drosarl commented 4 years ago

We am getting this error while using Francophone Mobile Money from Ivory coast

{"status":"error","message":"Invalid public key passed","data":{"code":"INV_PUBK","message":"Invalid public key passed"}}

I have checked the keys on Flutterwave dashboard and it's correct. I have even tried to use the secret key instead but I keep getting this error. I have also tried to generate a new public key, but still

as a side note i am getting this error on sandbox mode:

flutter: Response Text:
flutter: {"status":"success","message":"Charged fee","data":{"charge_amount":"200.00","fee":2.8,"merchantfee":"0","ravefee":"2.8","stampdutyfee":0,"currency":"XOF"}}
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The method '[]=' was called on null.
Receiver: null
Tried calling: []=("orderRef", "531ce346-d40f-4313-ab36-ba368a3a07e4")
#0      Object.noSuchMethod  (dart:core-patch/object_patch.dart:53:5)
#1      Payload.toJson 
package:rave_flutter/…/dto/payload.dart:142
#2      new ChargeRequestBody.fromPayload 
package:rave_flutter/…/dto/charge_request_body.dart:23
#3      MMFrancophoneTransactionManager.charge 
package:rave_flutter/…/manager/mm_francoophone_transaction_manager.dart:24
#4      BaseTransactionManager.displayFeeDialog.charge 
package:rave_flutter/…/manager/base_transaction_manager.dart:125
#5      GestureRecognizer.invokeCallback 
package:flutter/…/gestures/recognizer.dart:182
#6      TapGestureRecognizer.handleTapUp 
package:flutter/…/gestures/tap.dart:504
#7      BaseTapGestureRecognizer._checkUp 
package:flutter/…/gestures/tap.dart:282
#8      BaseTapGestureRecognizer.acceptGestu<…>

I don't know if it is wanted or not but it cause the loader to keep rolling until i manually close the box so I can't continue on the next API implementation my app.

fried19 commented 4 years ago

Now I have the same public key error too.

Rioland commented 4 years ago

am having the same issue

fried19 commented 4 years ago

@Rioland you have to make sure that ..staging=false because when it is true you must provide the sendBox mode public key which is defferent from the live mode public key

mopilo commented 4 years ago

@fried19 tried making ..staging= false. got this error

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 '='}

wilburx9 commented 4 years ago

@fried19 tried making ..staging= false. got this error

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 '='}

@mopilo this has been addressed in #47.

wilburx9 commented 4 years ago

I will be closing this issue for now. If @fried19 's doesn't work for you, please feel free to reopen.