Comments (5)
Initialising cardViewController
as lazy var did the trick. Thank you for the help.
from frames-ios.
I've just tried to run the code and it appears to work as expected, calling the delegate method as expected after entering some test card details and tapping the Pay button. Do you mean this isn't working for you when you run the sample code? Or it isn't working in your project?
If you could please post some sample code it might help see where the issue is.
from frames-ios.
I am facing the same issue.
I just copy and pasted in my project by referring GitHub home page's document.
Using pod 'Frames', '~> 3.0'.
Delegate is nil even after assigning view controller and not getting a call back.
Step 1:
private let checkoutAPIClient = CheckoutAPIClient(publicKey: "public_key",
environment: .sandbox)
Step 2 :
private var cardViewController: CardViewController {
let checkoutAPIClient = CheckoutAPIClient(publicKey: "publc_key",
environment: .sandbox)
return CardViewController(checkoutApiClient: checkoutAPIClient, cardHolderNameState: .hidden, billingDetailsState: .hidden)
}
Step 3:
ViewdidLoad :
cardViewController.delegate = self
cardViewController.rightBarButtonItem = UIBarButtonItem(title: "Pay", style: .done, target: nil, action: nil)
cardViewController.availableSchemes = [.visa, .mastercard , .americanExpress , .discover , .unionPay, .maestro]
Step 4 :
self.navigationController?.pushViewController(cardViewController, animated: true)
Step 5: Handling delegate methods
extension Viewcontroller : CardViewControllerDelegate {
func onSubmit(controller: CardViewController) {
print("Submited")
}
func onTapDone(controller: CardViewController, cardToken: CkoCardTokenResponse?, status: CheckoutTokenStatus) {
print("onTapDone")
}
}
from frames-ios.
@dhavalgajjar-greenapex Could you try change your cardViewController
to lazy var
? From your code, it appears every time you call cardViewController
, you are creating a new instance rather than retaining one.
from frames-ios.
Closing this issue for now, if you still experience this problem or the above solution does not work, feel free to re-open it.
from frames-ios.
Related Issues (20)
- ThreedsWebViewControllerDelegate not called HOT 1
- Frames Cocoapod integration is broken from 4.0.2 HOT 5
- merchant certificate not found HOT 4
- Localisation UI issue in TextField Alignment HOT 7
- Back Button and Accepted Cards not showing on TestFlight Build HOT 4
- Does headless mode have been removed in 4.0 ? HOT 4
- Support of alternative payment methods HOT 1
- Text color in Text fields isn't updated after changing Light/Dark mode HOT 4
- 3ds redirection not working HOT 2
- Remove Billing Info (name , address etc) from form.
- PhoneNumberKit dependency update HOT 5
- Expiry date textfield doesn't append '/' which lead to invalid date format error - Frames 4.0.4, Xcode 14.3 HOT 2
- Expiry date textfield doesn't append '/' which lead to invalid date format error - Frames 4.0.4, Xcode 14.3 HOT 1
- Users can submit the Pay button twice before 3DS view pops up HOT 4
- Support for app extension HOT 7
- Crash when use payment view HOT 15
- Problem with customisation. HOT 18
- Payment page alignment or text based on language switching is not updating HOT 5
- apple pay token got card_expired error HOT 1
- Crash with Apple Pay and version 4.3.3 of Frames and 2.0.3 of Risk SDKs HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frames-ios.