stripe-archive / paymentkit Goto Github PK
View Code? Open in Web Editor NEWEasily accept payments on iOS
License: MIT License
Easily accept payments on iOS
License: MIT License
Images are not loaded if used through CocoaPods with use_frameworks!
modifier. The problem is well described on StackOverflow
The following warning is present in PTKTextField.h
/.../Pods/PaymentKit/PaymentKit/PTKTextField.h:25:54: Auto property synthesis will not synthesize property 'delegate'; it will be implemented by its superclass, use @dynamic to acknowledge intention
Please fix it.
My users are scanning credit card with card.io.
Is there any way to initialize or add to pkview object received numbers.
Thanks
I have created 3 UITextFields (Swift 2.1) ie.,
Now, how do I use stripe's card validator on these? Is it possible to validate my card number, cvc fields using STPCardValidator?
Included are a number of
UITextFieldDelegate
delegates:PTKCardCVCDelegate
,PTKCardExpiryDelegate
andPTKCardNumberDelegate
. You can set these as the delegates of UITextField inputs, which ensures that input is limited and formatted.
I tried to use these delegates, but looks like they just doesn't exist:
Migrated from stripe/stripe-ios#21
Hello,
I installed the cocoapod Stripe 6.2.0 to use the PaymentKit framework.
When I compile the project, without any code using PaymentKit, I get errors in the linking phase :
duplicate symbol OBJC_CLASS$_PTKView in:
[...PATH...]/Build/Intermediates/season.build/Debug-iphoneos/season DEV.build/Objects-normal/arm64/PTKView.o
[...PATH...]/Build/Products/Debug-iphoneos/libStripe.a(STPPaymentCardTextField.o)
duplicate symbol OBJC_METACLASS$_PTKView in:
[...PATH...]/Build/Intermediates/season.build/Debug-iphoneos/season DEV.build/Objects-normal/arm64/PTKView.o
[...PATH...]/Build/Products/Debug-iphoneos/libStripe.a(STPPaymentCardTextField.o)
duplicate symbol OBJC_CLASS$_PTKCard in:
[...PATH...]/Build/Intermediates/season.build/Debug-iphoneos/season DEV.build/Objects-normal/arm64/PTKCard.o
[...PATH...]/Build/Products/Debug-iphoneos/libStripe.a(STPPaymentCardTextField.o)
duplicate symbol OBJC_METACLASS$_PTKCard in:
[...PATH...]/Build/Intermediates/season.build/Debug-iphoneos/season DEV.build/Objects-normal/arm64/PTKCard.o
[...PATH...]/Build/Products/Debug-iphoneos/libStripe.a(STPPaymentCardTextField.o)
ld: 4 duplicate symbols for architecture arm64
The AMEX CVC authentication completes after the entry of the 3rd number.
There are a large number of outstanding issues with PaymentKit that we're working to address. Given the nature of most of the bugs, we're doing a pretty deep refactor, so we'll probably fix a lot of problems in one fell swoop. If you'd like to be notified when we have something ready, please watch this meta-issue!
It will be nice to have support for Voice over so blind users can use this control. I will try to contribute and work on it on my free time but if someone beats me to it they can reference this issue.
I like the idea of a standarized credit card view, but don't like put all in a single text field. Is not obvios at first the necesary fields.
I think could be better to be able to have each component separated, so I can build the forms as I want (and provide better UI)
Is it possible that this could get an update to the stateMeta call to publicize it to the delegator? It's difficult otherwise to add an inputAccessoryView if a user is utilizing the PKView inside of a larger form.
addressZip of cardView didn't added in view. So we always getting null whenever we try to get card.addressZip.
The AMEX CVC authentication completes after the entry of the 3rd number.
I noticed that the Localization is not being pulled down when installing from the podspec.
This results in the card view placeholder text to be literal. Example:
self.cardNumberField.placeholder = NSLocalizedStringFromTable(@"placeholder.card_number", @"STPaymentLocalizable", nil);
will display the placeholder.card_number
in the placeholder.
I'm not comfortable enough with podspec files to correct this. I'm inclined to just include the entire resources folder because it has everything we need.
Also, this localization issue is a new change from this commit.
Hi,
I am trying to update my Pod & I cannot get my podspec to validate.
Podfile
platform :ios, '6.1'
pod 'Stripe'
pod 'Stripe/ApplePay'
pod 'ApplePayStubs', :git => 'https://github.com/stripe/ApplePayStubs.git'
pod 'PaymentKit', :git => 'https://github.com/stripe/PaymentKit.git'
podspec:
Pod::Spec.new do |s|
s.name = 'paywith-iphone-sdk'
s.version = '1.0.12'
s.summary = 'PayWith SDK'
s.platform = :ios, '6.1'
s.homepage = 'http://paywith.com'
s.license = {
:type => 'BSD',
:file => 'LICENSE'
}
s.author = {
'YOURNAME' => '[email protected]'
}
s.source = {
:git => 'https://github.com/Wantsa/paywithsdk-ios-pod-source.git',
:tag => s.version.to_s
}
s.resources = 'PayWithSDK.framework/PWResources/'
s.public_header_files = 'PayWithSDK.framework/Headers/.h'
s.source_files = 'PayWithSDK.framework/Headers/*.h'
s.vendored_frameworks = 'PayWithSDK.framework'
s.frameworks = 'AVFoundation'
s.dependency 'AFNetworking'
s.dependency 'Stripe'
s.dependency 'Stripe/ApplePay'
s.dependency 'ApplePayStubs'
s.dependency 'PaymentKit'
s.dependency 'CardIO'
s.requires_arc = true
end
Pod::Spec.new do |s|
s.name = 'paywith-iphone-sdk'
s.version = '1.0.12'
s.summary = 'PayWith SDK'
s.platform = :ios, '6.1'
s.homepage = 'http://paywith.com'
s.license = {
:type => 'BSD',
:file => 'LICENSE'
}
s.author = {
'YOURNAME' => '[email protected]'
}
s.source = {
:git => 'https://github.com/Wantsa/paywithsdk-ios-pod-source.git',
:tag => s.version.to_s
}
s.resources = 'PayWithSDK.framework/PWResources/'
s.public_header_files = 'PayWithSDK.framework/Headers/.h'
s.source_files = 'PayWithSDK.framework/Headers/*.h'
s.vendored_frameworks = 'PayWithSDK.framework'
s.frameworks = 'AVFoundation'
s.dependency 'AFNetworking'
s.dependency 'Stripe'
s.dependency 'Stripe/ApplePay'
s.dependency 'ApplePayStubs'
s.dependency 'PaymentKit'
s.dependency 'CardIO'
s.requires_arc = true
end
Warning:
- WARN | PaymentKit/PaymentKit/PTKTextField.h:25:54: warning: auto property synthesis will not synthesize property 'delegate'; it will be implemented by its superclass, use @dynamic to acknowledge intention [-Wobjc-property-synthesis]
You cannot enter current month and year as an expiration date.
The resources should be prefixed with PTK just like the class names and such. Otherwise they may conflict with other resource names. This is especially likely with "placeholder.png".
For example, use PTKAmex.png rather than amex.png.
No support yet for @3x image assets which causes UI elements to appear blurry on the iPhone 6 plus
Hey
I just have a little feature request. I could be nice if there was an option in the PKView, like a check mark, if you would save the credit card (create token).
Hey guys,
After jmanian commit from 03 and 04 Aug, "improve isPartiallyValid " and "if it's valid then it's partially valid" invalid Card number doesn't have a red text anymore. Is there a reason for removing the red text behavior?
I just noticed this in an app that I built using the iOS 8 SDK on a phone that has been updated to iOS 9 (I don't really expect it to behave differently if built using the iOS 9 SDK but just an FYI for the state I'm in):
Since the field uses the standard system font, the widths are off using the new San Francisco and there are some ellipsis truncations happening. In addition, it looks like the color for placeholder text is darker than before? This makes the CC field look like it has already been filled in, this one might just be a 9b2 bug.
@jflinter I'm guessing your big rework of this isn't going to land before iOS 9?
I don't mean to suggest that this needs fixing immediately, particularly this early in the beta process. Just opening to track details.
Migrated from stripe/stripe-ios#27
Is there a method to clear fields without having the keyboard open? If I set the cardExpiryField and cardNumberField to @"", the keyboard pops up. I'd like to be able to clear the fields once a card has been submitted (so they can then submit another card).
When I add the latest version of stripe I got the error.
duplicate interface definition for class PTKCard
duplicate interface definition for class PTKView
Is this possible? Can i adjust, for example, the cornerRadius ? Background color?
creditcard textfield shows placehoder.card_n... field instead of blank.
NSGregorianCalendar, NSYearCalendarUnit and NSMonthCalendarUnit were all deprecated in iOS 8.0. They're now NSCalendarIdentifierGregorian, NSCalendarUnitYear and NSCalendarUnitMonth.
Hi there,
I have added the new version of PaymentKit in my project which is iOS8 and swift. I have added the bridging-header. I am getting errors within the PTKView.m - Unkown type name 'NSString'
Imported as instructed but getting a warning on PKTextfield.m file :
Semantic Issue
/PaymentKit/PKTextField.m:51:49: Undeclared selector 'pkTextFieldDidBackSpaceWhileTextIsEmpty:'
For this line :
if([self.delegate respondsToSelector:@selector(pkTextFieldDidBackSpaceWhileTextIsEmpty:)])
All files are imported as are required frameworks. Any ideas?
Migrated from stripe/stripe-ios#23
Hi, the PTKViews is positioning its subviews with fixed number sizes and setting its own frame which is used derive the other sibling / subview sizes
As a result it doesn't size its width attractive that don't work well on the iPhone 6 and iPhone 6 Plus when run at full res. @3x for 6+
Steps to reproduce
viewDidLayoutSubviews
Can it be fixed / refatored to support these larger device widths too or better yet refactored to use Auto Layout?
cc @danieladias
Steps to reproduce:
Now the textfield is uneditable.
I looked into it a little, and while the textfield is uneditable, the method -firstInvalidField is returning 'self.cardExpiryField.' Since this view isn't visible, when you call 'becomeFirstResponder' on it, nothing happens.
It should be as easy as creating a project with a shared Framework target. I could send a PR.
Hello all,i am facing a huge trouble in adding postal code to the PTKView.Please advice me how to add that or share a example code with me.
Thanks all in advance.
The as you type validation in PTKExpiry allows months to be entered as 00.
The following change to isPartiallyValid in PTKExpiry.m corrects the problem.
- (BOOL)isPartiallyValid
{
if ([self isValidLength]) {
return [self isValidDate];
} else {
return ![_month isEqualToString:@"00"] && [self month] <= 12 && _year.length <= 4;
}
}
This issue was migrated from stripe-ios: stripe/stripe-ios#17
I have not updated stripe from a long time and i now it seems that paymentkit is integrated into stripe. So i have used multiple things from paymentkit and i am not able to find proper thing how to migrate the code. I have some queries below.
let cardNumber:PTKCardNumber = PTKCardNumber(string:strCardNumber)
PTKTextField.textByRemovingUselessSpacesFromString(str as String)
What is used in place of above this all in new stripe?
NSGregorianCalendar
, NSYearCalendarUnit
, NSMonthCalendarUnit
were deprecated in iOS 8
The various card entry fields currently accomplish a lot of work by inserting/removing spaces; this causes a lot of issues and is accomplishable via way better means.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.