Closed ILWAT closed 6 months ago
CompositionalLayout.list
결제 로직 구현
input.selectedItem .subscribe(with: self, onNext: { owner, coinItem in guard let coinItem else {return} if coinItem.section == .coinItem { let payment = IamportPayment( pg: PG.html5_inicis.makePgRawName(pgId: SecretKeys.portOnePGID), merchant_uid: "ios_\(SecretKeys.serverSecretKey)_\(Int(Date().timeIntervalSince1970))", amount: coinItem.description).then {// amount:가격 $0.pay_method = PayMethod.card.rawValue // 결제수단 $0.name = "\(coinItem.title)" // 주문명 $0.buyer_name = "구매자명" $0.app_scheme = "GrowingTalk"// 결제 후 앱으로 복귀 위한 app scheme(Info.plist 설정) } paymentSubject.onNext(payment) } else { toastMessage.accept("코인 설명입니다!") } }) .disposed(by: disposeBag)
output.paymentSubject .subscribe(with: self) { owner, iamportPayment in Iamport.shared.payment( viewController: owner, userCode: SecretKeys.portOneUserCode, payment: iamportPayment) { response in owner.paymentResponse.onNext(response) } } .disposed(by: disposeBag)
⚠️Issues
22
21
🛠️작업내용
CompositionalLayout.list
를 활용한 UI 구현결제 로직 구현
📱스크린샷