Closed speaktoalvin closed 8 years ago
Hi, I'm getting 401 when calling https://qa02-api.worldpay.io/v1/tokens to create token. My client key is set correctly.
You please try to integrate World Pay in a Swift project. Import the header in bridging-header and try to call this method "setClientKey". Please let me know whether you can see any methods like that or not.
@donaldking We have identified the problem and will release an updated version tomorrow.
@alvinvarghese The library was written for Objective C, we are in the process of adding Swift support for it. Will let you know once this is ready.
@ao That's great. Looking forward to it :)
@donaldking please pull the repo.
@ao Thanks! that was a quick fix! :)
@alvinvarghese You can surely set client key in a swift project. It works perfectly fine and there are many ways you could do this. The way i've implemented it is by simply subclassing WorldPay and calling self.clientKey = "my-client-key" in my swift project. Works perfectly fine. @ao ObjC proj / lib would work PERFECTLY well with Swift projects :) I have lots! @alvinvarghese see my screen shot attached. Let me know if you have any issues. Cheers
Ohh great. I didn't think about that.
Version 1.3.0 has just been released. This should resolve your Swift issues.
Thats really great :)
I am trying to integrate World Pay iOS SDK with Swift 2.0 and iOS 9.2. As per the documentation there should be a function called "setClientKey". Unfortunately i could not find any functions like that.
When i type this Xcode helps with auto-completion, but i could see only these.
I found an another on using swift. This returns an error like this "Cannot assign to property: function call returns immutable value"
But inside World Pay iOS Library, i saw this.
"Property that sets the Client Key which is used for API calls made directly from your customer's browser" @property (nonatomic, retain) NSString *clientKey;
Which means that i can set Client Key using this property. But i could not.
Is there any workaround ? Let me know please.