From 8adc9d0c1dc5744288ed2f52ff9db47a1e0bea1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Thu, 27 Oct 2022 15:00:42 +0800 Subject: Use CURLOPT_CAINFO_BLOB instead Easier on platforms like Android, especially on other languages/frameworks. --- midtrans.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'midtrans.dart') 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 , Pointer), void Function(Pointer, Pointer)> ('midtrans_init'); - midtrans_init(apiKeyUtf8, caInfoUtf8); + midtrans_init(apiKeyUtf8, pemUtf8); calloc.free(apiKeyUtf8); - calloc.free(caInfoUtf8); + calloc.free(pemUtf8); } void chargeBanktransfer(MidtransBanktransfer payment, -- cgit v1.2.3