diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-10-27 15:00:42 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-10-27 15:00:42 +0800 |
commit | 8adc9d0c1dc5744288ed2f52ff9db47a1e0bea1a (patch) | |
tree | f8603629199a3121c86b4116aea2380eb94d4a99 /midtrans.dart | |
parent | 06ac2fc5d785c4ed57b228000cebfaefee12c6c9 (diff) |
Use CURLOPT_CAINFO_BLOB instead
Easier on platforms like Android, especially on other
languages/frameworks.
Diffstat (limited to 'midtrans.dart')
-rw-r--r-- | midtrans.dart | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/midtrans.dart b/midtrans.dart index a5e622f..35ee23b 100644 --- a/midtrans.dart +++ b/midtrans.dart @@ -21,20 +21,20 @@ class MidtransBanktransfer extends Struct { class Midtrans { DynamicLibrary dylib; - Midtrans(String apiKey, String caInfo) { + Midtrans(String apiKey, String pem) { dylib = Platform.isAndroid ? DynamicLibrary.open('libmidtrans.so') : DynamicLibrary.process(); final apiKeyUtf8 = apiKey.toNativeUtf8(); - final caInfoUtf8 = caInfo.toNativeUtf8(); + final pemUtf8 = pem.toNativeUtf8(); final midtrans_init = dylib.lookupFunction <Void Function(Pointer<Utf8>, Pointer<Utf8>), void Function(Pointer<Utf8>, Pointer<Utf8>)> ('midtrans_init'); - midtrans_init(apiKeyUtf8, caInfoUtf8); + midtrans_init(apiKeyUtf8, pemUtf8); calloc.free(apiKeyUtf8); - calloc.free(caInfoUtf8); + calloc.free(pemUtf8); } void chargeBanktransfer(MidtransBanktransfer payment, |