iamport_flutter
iamport_flutter copied to clipboard
플러터(android, iOS)에서 결제신청시 오류가 나옵니다.
개발환경:
맥 버전 Monterey 12.4
Android Studio 2021.2.1 Patch 1
Xcode: 13.4.1
Flutter:
environment: sdk: ">=2.17.0 <3.0.0"
연관 패키지 버전:
iamport_flutter: ^0.10.0
webview_flutter: ^3.0.0
flutter_inappwebview: ^5.4.3+7
태스트 기기: Galaxy S10e, android 12.0
코드:
IamportPayment(
appBar: CommonAppBar(
title: "결제",
context: context,
hasGetBack: false,
onTapFunction: () {
Get.back();
},
),
/* 웹뷰 로딩 컴포넌트 */
initialChild: const Center(
child: CircularProgressIndicator(),
),
/* [필수입력] 가맹점 식별코드 */
userCode: "000000",
/* [필수입력] 결제 데이터 */
data: PaymentData(
pg: "html5_inicis", // PG사
payMethod: "card", // 결제수단
name: "테스트 주문", // 주문명
merchantUid: "merchantUid, // 주문번호
amount: 1000, // 결제금액
buyerName: "홍길동", // 구매자 이름
buyerTel: "01012345678", // 구매자 연락처
buyerEmail: "[email protected]", // 구매자 이메일
// buyerAddr: "서울시 광진구 아차산로 55길 47", // 구매자 주소
// buyerPostcode: "05014", // 구매자 우편번호
appScheme: "example", // 앱 URL scheme
displayCardQuota: [2, 3] //결제창 UI 내 할부개월수 제한
),
/* [필수입력] 콜백 함수 */
callback: (Map<String, String> result) {
// print(result);
Logger().d(result);
},
)
위와 같이 이용하였는데 콜백함수에서 아래와 같이 오류 나옵니다(위 코드에서 구체적인 값들은 편집하였고 실제 코드에서는 자기 값들을 이용하였습니다).
![image](https://user-images.githubusercontent.com/39854665/200955226-2e7a6327-8812-4462-9ac6-91a988405e1b.png)
그런데 여러번 반복 테스트한 결과 어떤 때는 오류없이 작동해서 아래와 같이 결제 화면이 나옵니다. 즉 오류 나왔다 안나왔다 하네요.
오류 원인이 뭘가요? 빠른 도움 요청드립니다.