@@ -25,17 +25,13 @@ internal class UpdateClientConfigAPI(
25
25
ResourceLoader ()
26
26
)
27
27
28
- suspend fun updateClientConfig (
29
- orderId : String ,
30
- fundingSource : PayPalWebCheckoutFundingSource
31
- ): UpdateClientConfigResult {
28
+ suspend fun updateClientConfig (orderId : String ): UpdateClientConfigResult {
32
29
@RawRes val resId = R .raw.graphql_query_update_client_config
33
30
return when (val result = resourceLoader.loadRawResource(applicationContext, resId)) {
34
31
is LoadRawResourceResult .Success ->
35
32
sendUpdateClientConfigGraphQLRequest(
36
33
query = result.value,
37
- orderId = orderId,
38
- fundingSource = fundingSource
34
+ orderId = orderId
39
35
)
40
36
41
37
is LoadRawResourceResult .Failure -> UpdateClientConfigResult .Failure (
@@ -46,15 +42,14 @@ internal class UpdateClientConfigAPI(
46
42
47
43
private suspend fun sendUpdateClientConfigGraphQLRequest (
48
44
query : String ,
49
- orderId : String ,
50
- fundingSource : PayPalWebCheckoutFundingSource
45
+ orderId : String
51
46
): UpdateClientConfigResult {
52
47
val variables = JSONObject ()
53
48
.put(" orderID" , orderId)
54
- .put(" fundingSource" , fundingSource.value )
55
- .put(" integrationArtifact" , " PAYPAL_JS_SDK " )
49
+ .put(" fundingSource" , " card " )
50
+ .put(" integrationArtifact" , " MOBILE_SDK " )
56
51
.put(" userExperienceFlow" , " INCONTEXT" )
57
- .put(" productFlow" , " SMART_PAYMENT_BUTTONS " )
52
+ .put(" productFlow" , " MOBILE_SDK " )
58
53
.put(" buttonSessionId" , JSONObject .NULL )
59
54
60
55
val graphQLRequest = JSONObject ()
0 commit comments