인 앱 결제
- 서버 호출 후 충전이 완료되면 충전완료 페이지로 이동하도록 수정
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package kr.co.vividnext.sodalive.mypage.can.charge.iap
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Rect
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
@@ -245,17 +244,15 @@ class CanChargeIapFragment : BaseFragment<FragmentCanChargeIapBinding>(
|
||||
selectedProductDetails = selectedProductDetails!!,
|
||||
purchase = purchase
|
||||
) { chargeCan ->
|
||||
consumePurchase(purchase) {
|
||||
handler.post {
|
||||
viewModel.showToast("캔이 충전되었습니다")
|
||||
SharedPreferenceManager.can += chargeCan
|
||||
handler.post {
|
||||
viewModel.showToast("캔이 충전되었습니다")
|
||||
SharedPreferenceManager.can += chargeCan
|
||||
|
||||
if (activity != null) {
|
||||
if (activity as? CanChargeActivity != null) {
|
||||
(activity as CanChargeActivity).successIapCharge()
|
||||
} else {
|
||||
requireActivity().finish()
|
||||
}
|
||||
if (activity != null) {
|
||||
if (activity as? CanChargeActivity != null) {
|
||||
(activity as CanChargeActivity).successIapCharge()
|
||||
} else {
|
||||
requireActivity().finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user