Skip to content

Commit

Permalink
Merge pull request #53 from cafebazaar/fix-commit-response
Browse files Browse the repository at this point in the history
Fix commit null response
  • Loading branch information
hamid97m authored Oct 14, 2023
2 parents 284b5cf + 40e37e9 commit b5eb260
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions BazaarPay/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ plugins {
id 'maven-publish'
}

final VERSION_NAME = "5.0.1"
final VERSION_CODE = 22
final VERSION_NAME = "5.0.2"
final VERSION_CODE = 23

android {
compileSdk libs.versions.androidCompileSdk.get() as int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import ir.cafebazaar.bazaarpay.extensions.safeApiCall
import ir.cafebazaar.bazaarpay.models.GlobalDispatchers
import ir.cafebazaar.bazaarpay.utils.Either
import kotlinx.coroutines.withContext
import okhttp3.ResponseBody
import retrofit2.Response

internal class PaymentRemoteDataSource {

Expand Down Expand Up @@ -82,7 +82,7 @@ internal class PaymentRemoteDataSource {

suspend fun commit(
checkoutToken: String
): Either<ResponseBody> {
): Either<Response<Unit>> {
return withContext(globalDispatchers.iO) {
return@withContext safeApiCall(ServiceType.BAZAARPAY) {
paymentService.commit(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import ir.cafebazaar.bazaarpay.data.payment.models.pay.response.IncreaseBalanceO
import ir.cafebazaar.bazaarpay.data.payment.models.pay.response.InitCheckoutResponse
import ir.cafebazaar.bazaarpay.data.payment.models.pay.response.PayResponse
import ir.cafebazaar.bazaarpay.data.payment.models.pay.response.TraceResponse
import okhttp3.ResponseBody
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
Expand Down Expand Up @@ -47,7 +47,7 @@ internal interface PaymentService {
@POST("pardakht/badje/v1/commit/")
suspend fun commit(
@Body commitRequest: CommitRequest
): ResponseBody
): Response<Unit>

@POST("pardakht/badje/v1/trace/")
suspend fun trace(
Expand Down

0 comments on commit b5eb260

Please sign in to comment.