Skip to content

Commit

Permalink
Released version 7.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Zach Vega-Perkins committed Mar 21, 2018
1 parent 6841e10 commit e4a187f
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 31 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2018-03-21
* Released version 7.0.1
* Calls to /v2/checkout/create with an EMV token will no longer return an EMV receipt

2018-02-06
* Released version 7.0.0
* Added logLevel property to WPConfig
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.0
7.0.1
2 changes: 1 addition & 1 deletion WePay.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "WePay"
s.version = "7.0.0"
s.version = "7.0.1"
s.summary = "WePay binary for both simulator and iOS devices"
s.description = "A library that helps WePay partners develop their own iOS apps aimed at merchants and/or consumers for collection of payments via various payment methods"
s.homepage = "http://github.com/wepay/wepay-ios"
Expand Down
18 changes: 0 additions & 18 deletions WePay.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
57FF3CAF1A0D9BA600D460E7 /* WPConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 57FF3CAD1A0D9BA600D460E7 /* WPConfig.m */; };
57FF3CBA1A0DB55500D460E7 /* WPPaymentToken.h in Headers */ = {isa = PBXBuildFile; fileRef = 57FF3CB81A0DB55500D460E7 /* WPPaymentToken.h */; settings = {ATTRIBUTES = (Public, ); }; };
57FF3CBB1A0DB55500D460E7 /* WPPaymentToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 57FF3CB91A0DB55500D460E7 /* WPPaymentToken.m */; };
7E2B01591DF237D00054EB1B /* RKI_MFI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E2B01581DF237D00054EB1B /* RKI_MFI.framework */; };
7E2B015C1DF23A460054EB1B /* ExternalAccessory.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E2B015B1DF23A460054EB1B /* ExternalAccessory.framework */; };
7ECF64601DF60B0500C88051 /* libstdc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 7ECF645F1DF60B0500C88051 /* libstdc++.tbd */; };
7ECF64611DF60B3700C88051 /* ExternalAccessory.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E2B015B1DF23A460054EB1B /* ExternalAccessory.framework */; };
Expand All @@ -72,8 +71,6 @@
9C59540F1D67BE5D008F7596 /* UnitTestWPDipTransactionHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C59540D1D67BE5D008F7596 /* UnitTestWPDipTransactionHelper.m */; };
9CB0B8E91D3EEC62004B7347 /* WPMockConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CB0B8E71D3EEC62004B7347 /* WPMockConfig.h */; settings = {ATTRIBUTES = (Public, ); }; };
9CB0B8EA1D3EEC62004B7347 /* WPMockConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CB0B8E81D3EEC62004B7347 /* WPMockConfig.m */; };
9CCEFD061D3966F400CABD00 /* RPx_MFI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CCEFD031D3966F400CABD00 /* RPx_MFI.framework */; };
9CCEFD071D3966F400CABD00 /* RUA_MFI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CCEFD041D3966F400CABD00 /* RUA_MFI.framework */; };
9CE3E9301D481EC200C3A134 /* libstdc++.6.0.9.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CE3E92F1D481EC200C3A134 /* libstdc++.6.0.9.tbd */; };
9CE3E9451D494EF400C3A134 /* IntegrationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CE3E9441D494EF400C3A134 /* IntegrationTest.m */; };
9CE3E9481D495BAC00C3A134 /* TestTokenizationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CE3E9471D495BAC00C3A134 /* TestTokenizationDelegate.m */; };
Expand All @@ -83,7 +80,6 @@
C31E81411E5782B400D2E228 /* WPUserDefaultsHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = C31E813F1E5782B400D2E228 /* WPUserDefaultsHelper.m */; };
C36C19681E92ECA000DEA375 /* UnitTestLogConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = C36C19671E92ECA000DEA375 /* UnitTestLogConfiguration.m */; };
C392CCFB1E53BA8B00BED4A0 /* UnitTestWPUserDefaultsHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = C392CCFA1E53BA8B00BED4A0 /* UnitTestWPUserDefaultsHelper.m */; };
C3978CF31E301B25002B2F0D /* G4XSwiper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D77FBA1A1D9D87A90078961A /* G4XSwiper.framework */; };
C3978CF41E301B25002B2F0D /* RKI_MFI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E2B01581DF237D00054EB1B /* RKI_MFI.framework */; };
C3978CF51E301B25002B2F0D /* RPx_MFI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CCEFD031D3966F400CABD00 /* RPx_MFI.framework */; };
C3978CF61E301B25002B2F0D /* RUA_MFI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CCEFD041D3966F400CABD00 /* RUA_MFI.framework */; };
Expand All @@ -101,12 +97,9 @@
C3D1EF771E8B54B5004BD033 /* WPGlobals.m in Sources */ = {isa = PBXBuildFile; fileRef = C3D1EF751E8B54B5004BD033 /* WPGlobals.m */; };
C3D1EF7A1E8DCB8D004BD033 /* WPConstantsExternal.h in Headers */ = {isa = PBXBuildFile; fileRef = C3D1EF781E8DCB8D004BD033 /* WPConstantsExternal.h */; settings = {ATTRIBUTES = (Public, ); }; };
C3D1EF7B1E8DCB8D004BD033 /* WPConstantsExternal.m in Sources */ = {isa = PBXBuildFile; fileRef = C3D1EF791E8DCB8D004BD033 /* WPConstantsExternal.m */; };
D7378ADB1E4E80CC00CDB7BC /* TrustDefender.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D7378ADA1E4E80CC00CDB7BC /* TrustDefender.framework */; };
D7378ADF1E4E8C7E00CDB7BC /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D7378ADE1E4E8C7E00CDB7BC /* libz.tbd */; };
D74B4B181DF7A939002416D5 /* IntegrationTestConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = D74B4B171DF7A939002416D5 /* IntegrationTestConfig.m */; };
D7765B841DFF6B0A0030CDCA /* IntegrationTestCardReader.m in Sources */ = {isa = PBXBuildFile; fileRef = D7765B831DFF6B0A0030CDCA /* IntegrationTestCardReader.m */; };
D77FBA1B1D9D87A90078961A /* G4XSwiper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D77FBA1A1D9D87A90078961A /* G4XSwiper.framework */; };
D792C3361E5E8EB400A624F0 /* TrustDefender.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D7378ADA1E4E80CC00CDB7BC /* TrustDefender.framework */; };
D7BEAD071D77BC0A0071C023 /* WPBatteryHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = D7BEAD051D77BC0A0071C023 /* WPBatteryHelper.h */; };
D7BEAD081D77BC0A0071C023 /* WPBatteryHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = D7BEAD061D77BC0A0071C023 /* WPBatteryHelper.m */; };
D7BEAD091D77BC0A0071C023 /* WPBatteryHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = D7BEAD061D77BC0A0071C023 /* WPBatteryHelper.m */; };
Expand Down Expand Up @@ -233,11 +226,9 @@
C3D1EF751E8B54B5004BD033 /* WPGlobals.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WPGlobals.m; path = Internal/WPGlobals.m; sourceTree = "<group>"; };
C3D1EF781E8DCB8D004BD033 /* WPConstantsExternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WPConstantsExternal.h; sourceTree = "<group>"; };
C3D1EF791E8DCB8D004BD033 /* WPConstantsExternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WPConstantsExternal.m; sourceTree = "<group>"; };
D7378ADA1E4E80CC00CDB7BC /* TrustDefender.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = TrustDefender.framework; sourceTree = "<group>"; };
D7378ADE1E4E8C7E00CDB7BC /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
D74B4B171DF7A939002416D5 /* IntegrationTestConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = IntegrationTestConfig.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
D7765B831DFF6B0A0030CDCA /* IntegrationTestCardReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IntegrationTestCardReader.m; sourceTree = "<group>"; };
D77FBA1A1D9D87A90078961A /* G4XSwiper.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = G4XSwiper.framework; sourceTree = "<group>"; };
D7BEAD051D77BC0A0071C023 /* WPBatteryHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = WPBatteryHelper.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
D7BEAD061D77BC0A0071C023 /* WPBatteryHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = WPBatteryHelper.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
D7BEAD0A1D8206590071C023 /* TestBatteryLevelDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestBatteryLevelDelegate.h; sourceTree = "<group>"; };
Expand All @@ -258,22 +249,15 @@
buildActionMask = 2147483647;
files = (
7E2B015C1DF23A460054EB1B /* ExternalAccessory.framework in Frameworks */,
9CCEFD071D3966F400CABD00 /* RUA_MFI.framework in Frameworks */,
D7378ADB1E4E80CC00CDB7BC /* TrustDefender.framework in Frameworks */,
D77FBA1B1D9D87A90078961A /* G4XSwiper.framework in Frameworks */,
7E2B01591DF237D00054EB1B /* RKI_MFI.framework in Frameworks */,
570694011A0306FB00182EA2 /* SystemConfiguration.framework in Frameworks */,
9CCEFD061D3966F400CABD00 /* RPx_MFI.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
573054BC1A02F4DD00EA5FEE /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D792C3361E5E8EB400A624F0 /* TrustDefender.framework in Frameworks */,
D7378ADF1E4E8C7E00CDB7BC /* libz.tbd in Frameworks */,
C3978CF31E301B25002B2F0D /* G4XSwiper.framework in Frameworks */,
C3978CF41E301B25002B2F0D /* RKI_MFI.framework in Frameworks */,
C3978CF51E301B25002B2F0D /* RPx_MFI.framework in Frameworks */,
C3978CF61E301B25002B2F0D /* RUA_MFI.framework in Frameworks */,
Expand All @@ -297,11 +281,9 @@
570693981A02FE3600182EA2 /* Libs */ = {
isa = PBXGroup;
children = (
D7378ADA1E4E80CC00CDB7BC /* TrustDefender.framework */,
9CE3E92F1D481EC200C3A134 /* libstdc++.6.0.9.tbd */,
7E2B015B1DF23A460054EB1B /* ExternalAccessory.framework */,
7E2B01581DF237D00054EB1B /* RKI_MFI.framework */,
D77FBA1A1D9D87A90078961A /* G4XSwiper.framework */,
9CCEFD031D3966F400CABD00 /* RPx_MFI.framework */,
9CCEFD041D3966F400CABD00 /* RUA_MFI.framework */,
57D0842C1B01825000CD35CE /* AVFoundation.framework */,
Expand Down
6 changes: 3 additions & 3 deletions WePay/Internal/WPClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

@implementation WPClient

static NSString * const SDK_VERSION = @"v7.0.0";
static NSString * const WEPAY_API_VERSION = @"2016-03-30";
static NSString * const SDK_VERSION = @"v7.0.1";
static NSString * const WEPAY_API_VERSION = @"2017-05-31";

#pragma mark config class property

Expand Down Expand Up @@ -147,7 +147,7 @@ + (void) makeRequestToEndPoint: (NSURL *) endpoint
// Get json from nsdictionary parameter
NSData *requestData = [NSJSONSerialization dataWithJSONObject: params options: kNilOptions error: &parseError];
[request setHTTPBody: requestData];

if (parseError) {
errorHandler(parseError);
} else {
Expand Down
15 changes: 13 additions & 2 deletions WePay/Internal/WPDipTransactionHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,19 @@ - (void) consumeIssuerAuthenticationData:(NSString *)issuerAuthenticationData
[self reactToError:nil];

} else {
// complete the transaction
[self performEMVCompleteTransactionCommand];
if (self.authorizationError == nil) {
// short circuit the cryptogram request to the card via the reader
// since we did not authorize the card and received no transaction cryptogram
[self reportAuthorizationSuccess:[self createAuthInfoWithTC:MAGIC_TC
creditCardId:self.creditCardId]
orError:nil
forPaymentInfo:self.paymentInfo];
} else {
// we found an error, return it
[self reportAuthorizationSuccess:nil orError:self.authorizationError forPaymentInfo:self.paymentInfo];
}

[self reactToError:self.authorizationError];
}

}
Expand Down
10 changes: 7 additions & 3 deletions WePay/Internal/WPIngenicoCardReaderDetector.m
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ - (void) beginDetection {
}
} else if ([self isAudioJackPluggedIn]) {
// If Bluetooth is not enabled, we can only use a headphone jack device.
WPLog(@"Manually creating AUDIOJACK device since it was not detected, but a device is plugged into the audio jack.");
RUADevice *audioJackDevice = [[RUADevice alloc] initWithName:@"AUDIOJACK"
withIdentifier:@"AUDIOJACK"
withCommunicationInterface:RUACommunicationInterfaceAudioJack];
Expand Down Expand Up @@ -162,10 +163,11 @@ - (void) detectionComplete {

- (BOOL) isAudioJackPluggedIn {
AVAudioSessionRouteDescription *route = [[AVAudioSession sharedInstance] currentRoute];
BOOL result = NO;

BOOL result = self.config.mockConfig && self.config.mockConfig.useMockCardReader;
for (AVAudioSessionPortDescription* description in [route outputs]) {
if ([AVAudioSessionPortHeadphones isEqualToString:[description portType]]) {
WPLog(@"Detected that something is plugged into the audio jack.");
result = YES;
break;
}
Expand All @@ -186,7 +188,9 @@ - (void) discoveredDevice:(RUADevice *)reader {
WPLog(@"onDeviceDiscovered %@", reader.name);

BOOL isMoby = reader.name && [reader.name hasPrefix:@"MOB30"];
BOOL isAudioJack = reader.name && [reader.name isEqualToString:@"AUDIOJACK"];
// We check if something is plugged into AUDIOJACK because ROAM incorrectly detects
// a device there on some versions of iOS.
BOOL isAudioJack = reader.name && [reader.name isEqualToString:@"AUDIOJACK"] && [self isAudioJackPluggedIn];

if (isMoby || isAudioJack) {
WPLog(@"add device: %@", reader.name);
Expand Down
20 changes: 19 additions & 1 deletion WePay/Internal/WePay_Manual.m
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,24 @@ - (NSDictionary *) createTokenizationRequestParamsForPaymentInfo:(WPPaymentInfo
NSString *name = [self fullNameFromPaymentInfo:paymentInfo];
NSDictionary *manualInfo = (NSDictionary *)paymentInfo.manualInfo;

// Convert the paymentInfo billing address into the international address format.
NSDictionary *addressParams = [paymentInfo.billingAddress toDict];
NSMutableDictionary *transformedAddressParams = [NSMutableDictionary dictionary];

for (id key in addressParams) {
id value = [addressParams objectForKey:key];
if (value != [NSNull null]) {
NSString *keyString = (NSString *) key;
if ([keyString isEqualToString:@"zip"] || [keyString isEqualToString:@"postcode"]) {
[transformedAddressParams setObject:value forKey:@"postal_code"];
} else if ([keyString isEqualToString:@"state"]) {
[transformedAddressParams setObject:value forKey:@"region"];
} else {
[transformedAddressParams setObject:value forKey:key];
}
}
}

NSMutableDictionary *requestParams = [@{
@"client_id":self.config.clientId,
@"cc_number":[manualInfo objectForKey:@"cc_number"],
Expand All @@ -114,7 +132,7 @@ - (NSDictionary *) createTokenizationRequestParamsForPaymentInfo:(WPPaymentInfo
@"expiration_year":[manualInfo objectForKey:@"expiration_year"],
@"user_name": name ? name : [NSNull null],
@"email": paymentInfo.email ? paymentInfo.email : [NSNull null],
@"address": [paymentInfo.billingAddress toDict]
@"address":transformedAddressParams
} mutableCopy];
if (paymentInfo.isVirtualTerminal) {
[requestParams setObject:@"mobile" forKey:@"virtual_terminal"];
Expand Down
2 changes: 1 addition & 1 deletion WePayExample/WePayExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
57C45AC31B4E04120007E918 /* WePay.framework in Frameworks */,
D7378AE21E4E8C9C00CDB7BC /* libz.tbd in Frameworks */,
7E5BFAEF1DF241D100AB77D8 /* libstdc++.6.0.9.tbd in Frameworks */,
7E5BFAED1DF241AB00AB77D8 /* libstdc++.tbd in Frameworks */,
7E5BFAE51DF23E3E00AB77D8 /* ExternalAccessory.framework in Frameworks */,
57C45AC31B4E04120007E918 /* WePay.framework in Frameworks */,
57CB38321ACCF2D300C8A6B2 /* CoreLocation.framework in Frameworks */,
57CB38301ACCDCF900C8A6B2 /* CoreTelephony.framework in Frameworks */,
57664BD31A1AEBAB0092B3AA /* CoreBluetooth.framework in Frameworks */,
Expand Down
4 changes: 3 additions & 1 deletion WePayExample/WePayExample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>WePayExample</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand All @@ -15,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>7.0.0-beta-1</string>
<string>7.0.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
Binary file modified WePayExample/WePayExample/Libs/WePay.framework/Versions/A/WePay
Binary file not shown.
Binary file modified documentation/wepay-ios.pdf
Binary file not shown.

0 comments on commit e4a187f

Please sign in to comment.