
🙂 안드로이드 프로젝트에 결제 기능을 추가하기 위해 토스 페이먼츠를 연동해보자
dependencyResolutionManagement {
...
repositories {
...
mavenCentral()
maven { url "https://jitpack.io" }
}
}
dependencies {
...
implementation 'com.github.tosspayments:payment-sdk-android:<CURRENT_VERSION>'
}
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
...
<com.tosspayments.paymentsdk.view.PaymentMethod
android:id="@+id/payment_widget"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp" />
<com.tosspayments.paymentsdk.view.Agreement
android:id="@+id/agreement_widget"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
...
</androidx.constraintlayout.widget.ConstraintLayout>



