adyen-ios icon indicating copy to clipboard operation
adyen-ios copied to clipboard

[NEED ASSIST] AdyenContext not found in Adyen module

Open ralzuhouri opened this issue 2 years ago • 3 comments

I am trying to get the example in the readme file to compile:

let apiContext = APIContext(clientKey: clientKey, environment: Environment.test) let context = AdyenContext(apiContext: apiContext, analyticsConfiguration: analyticsConfiguration) let configuration = DropInComponent.Configuration(context: context)

I added with the swift package manager the latest Adyen package and I made sure that I have the following packages installed:

  • Adyen 4.8.0
  • Adyen3DS2 2.2.6
  • AdyenNetworking 1.0.0
  • AdyenWeChatPayInternal 2.1.0

Then I tried to insert the above code snippet in the example. And I get this error: "Cannot find 'AdyenContext' in scope". I looked for AdyenContext and I verified that it is indeed present in the Adyen repository under the path Adyen/Core/AdyenContext.

But if you look at the below screenshot, the AdyenContext directory is missing from the package loaded with the Swift package manager:

Screenshot 2022-07-28 at 16 36 57

So the class is missing and hence the error.

Can somebody provide an example with some steps on how to successfully run the above code snipper (it's in the readme page)?

ralzuhouri avatar Jul 28 '22 14:07 ralzuhouri

Hello @ralzuhouri ,

In preparation of our upcoming version 5 (develop branch), we recently updated our documentation to the new integration that will come with v5, but forgot to provide the documentation for v4. We will add samples for v4 branches soon.

In the meantime, allow me to direct you to our documentation page which currently refers to v4 integration. https://docs.adyen.com/online-payments/ios/drop-in

Thanks for notifying us with this :)

erenbesel avatar Jul 28 '22 14:07 erenbesel

If I follow this documentation I get the error "Value of type 'DropInComponent' has no member 'payment'"

ralzuhouri avatar Aug 02 '22 10:08 ralzuhouri

Hey @ralzuhouri

Indeed, thanks for pointing it out! Seems like our official documentation is outdated 😅

We are working on a new versioning system for Adyen Docs and are looking to improve this in future. Sorry for the inconvenience

For now you can use GitHub v4.8.0 README as a reference documentation.

The payment were moved from DropInComponent to a DropInComponent.Configuration . You can set it as:

let configuration = DropInComponent.Configuration(apiContext: apiContext)
configuration.payment = payment

descorp avatar Aug 02 '22 13:08 descorp

Hey @ralzuhouri

Were you able to resolve the issue?

descorp avatar Aug 22 '22 10:08 descorp

I am closing this topic due to a lack of activity

descorp avatar Sep 13 '22 08:09 descorp