iOS-SDK icon indicating copy to clipboard operation
iOS-SDK copied to clipboard

Received both the Error and the Complete delegate events simultaneously

Open citcon-aoyansheng opened this issue 1 year ago • 7 comments

PayPal SDK Version

1.3.2

Environment

Sandbox

Xcode Version

Xcode 15.3

OS Version & Device

iPhone 13 iOs 17.4.1

Integration type

Swfit Package Manager

Development Processor

Apple Silicon (M-series chips)

Describe the bug

In the Demo APP, when selecting the Native checkout mode and replacing the Client ID with my own account's ID (without modifying the Order ID), I observed the following:

  1. received an error delegate callback. image

  2. then the app shows a payment page, click the complete IMG_0053

  3. at last receive a complete callback image

  4. I consistently encountered this screen when I replaced the order ID with my own. A 'Review Order' button is at the bottom but not a 'Complete Order' button. When I clicked it, the popup just disappeared.

actual IMG_0055

expect IMG_0053 2

To reproduce

My client id: AYxfFTQHBFPxhM7zzo2oJSImcDVfL-kn5zv6vbQBeW5MBQxNgYECVkpVmLUvFWsjRt8c_Oxa2-OPkFr_

Expected behavior

If an error callback is received, the flow should be stopped and not proceed with the payment.

Screenshots

No response

citcon-aoyansheng avatar May 31 '24 09:05 citcon-aoyansheng

Is this SDK in a stable release or beta/preview version?

citcon-aoyansheng avatar May 31 '24 09:05 citcon-aoyansheng

Thank you for your interest in our SDK. The demo app uses hard coded clientID and sandbox merchant credentials in our test merchant server.

If you hard code another clientID, the demo app will not work properly.

KunJeongPark avatar Jun 02 '24 15:06 KunJeongPark

@KunJeongPark Thanks. Regarding the issue described in the fourth scenario above, when I used my Client ID and Order ID, the 'Review Order' is on the screen instead of the 'Complete Order'. Please help me understand what might be the problem in this case.

citcon-aoyansheng avatar Jun 02 '24 16:06 citcon-aoyansheng

I'm not sure but it is not a flow that is supported by the demo app, modifying the demo app to include a different client ID.

KunJeongPark avatar Jun 02 '24 16:06 KunJeongPark

The same thing happened when I integrated the SDK separately in my app. It also shows the 'Review order'

citcon-aoyansheng avatar Jun 02 '24 16:06 citcon-aoyansheng

It is the same with your own app, you need server side integration. ClientID is only for use in the SDK.

It looks like you are using PayPalCheckoutSDK which is wrapped in our PayPalNativeCheckout module and that SDK along with the PayPalNativeCheckout module is being deprecated. We are only addressing existing merchants' critical security bugs for that module. We are directing our merchants to use PayPalWebPayments.

KunJeongPark avatar Jun 03 '24 13:06 KunJeongPark

Currently, I have not used the backend server. I created the order using the Client ID and Secret in the Postman and obtained the Order ID. Then set the Client ID and Order ID in the demo app, which is when the problem occurred. Even if I use PayPalWebPayments, it's the same. IMG_0056

citcon-aoyansheng avatar Jun 04 '24 05:06 citcon-aoyansheng

I have not been able to reproduce this issue. I suspect that this is an issue with permissions of order created. Order ID passed to our SDK must be created by same merchant credentials as clientID passed into our SDK.

If you continue to run into this issue, you can create another ticket with correlation-ID

KunJeongPark avatar Nov 25 '24 18:11 KunJeongPark