Skip to content

Commit 65737fa

Browse files
authored
Merge pull request #417 from paypal/updateMigrationGuide
updateMigrationGuide
2 parents d69a2fa + 63a5cc1 commit 65737fa

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
branches:
55
- main
6+
paths-ignore:
7+
- '**.md'
8+
- 'docs/**'
69
env:
710
SIGNING_KEY_FILE_PATH: /home/runner/secretKey.gpg
811
jobs:

v2_MIGRATION_GUIDE.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -190,28 +190,33 @@ We refactored the `PayPalWebClient` API to improve the developer experience. Use
190190
private fun launchPayPalCheckout() {
191191
val checkoutRequest: PayPalWebCheckoutRequest = TODO("Create a PayPal checkout request.")
192192
- payPalClient.start(checkoutRequest)
193-
+ when (val result = paypalClient.start(this, checkoutRequest)) {
194-
+ is PayPalPresentAuthChallengeResult.Success -> {
195-
+ // Auth Challenge presentation succeeded. Once the user has completed the auth challenge and
196-
+ // the merchant app has re-entered the foreground via onResume() or onNewIntent(), make a
197-
+ // balancing call to finishStart()
193+
+ paypalClient.start(this, checkoutRequest) { result ->
194+
+ when (result) {
195+
+ is PayPalPresentAuthChallengeResult.Success -> {
196+
+ // Auth Challenge presentation succeeded. Once the user has completed the auth challenge and
197+
+ // the merchant app has re-entered the foreground via onResume() or onNewIntent(), make a
198+
+ // balancing call to finishStart()
199+
+ }
200+
+ is PayPalPresentAuthChallengeResult.Failure -> TODO("Handle Present Auth Challenge Failure")
198201
+ }
199-
+ is PayPalPresentAuthChallengeResult.Failure -> TODO("Handle Present Auth Challenge Failure")
200202
+ }
201203
}
202204

203205
private fun launchPayPalVault() {
204206
val vaultRequest: PayPalWebVaultRequest = TODO("Create a card vault request.")
205207
- payPalClient.vault(vaultRequest)
206-
+ when (val result = paypalClient.vault(this, vaultRequest)) {
207-
+ is PayPalPresentAuthChallengeResult.Success -> {
208-
+ // Auth Challenge presentation succeeded. Once the user has completed the auth challenge and
209-
+ // the merchant app has re-entered the foreground via onResume() or onNewIntent(), make a
210-
+ // balancing call to finishVault()
208+
+ paypalClient.vault(this, vaultRequest) { result ->
209+
+ when (result) {
210+
+ is PayPalPresentAuthChallengeResult.Success -> {
211+
+ // Auth Challenge presentation succeeded. Once the user has completed the auth challenge and
212+
+ // the merchant app has re-entered the foreground via onResume() or onNewIntent(), make a
213+
+ // balancing call to finishVault()
214+
+ }
215+
+ is PayPalPresentAuthChallengeResult.Failure -> TODO("Handle Present Auth Challenge Failure")
211216
+ }
212-
+ is PayPalPresentAuthChallengeResult.Failure -> TODO("Handle Present Auth Challenge Failure")
213217
+ }
214218
}
219+
}
215220

216221
+ fun checkForPayPalAuthCompletion(intent: Intent) {
217222
+ // check for checkout completion

0 commit comments

Comments
 (0)