Skip to content

Commit 347e873

Browse files
Merge pull request #508 from checkout/release/4.3.1
Release 4.3.1
2 parents c921e31 + 7ee3593 commit 347e873

File tree

11 files changed

+33
-11
lines changed

11 files changed

+33
-11
lines changed

.github/CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@ All notable changes to this project will be documented in this file.
55

66
#### 4.x Releases
77

8-
## [4.3.0](https://github.com/checkout/frames-ios/releases/tag/4.2.1)
8+
## [4.3.1](https://github.com/checkout/frames-ios/releases/tag/4.3.1)
9+
10+
Released on 2024-01-19
11+
12+
Updates:
13+
14+
- Added capability for disabling Billing Address.
15+
16+
17+
## [4.3.0](https://github.com/checkout/frames-ios/releases/tag/4.3.0)
918

1019
Released on 2023-11-07
1120

.github/partial-readmes/MakeItYourOwn.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ paymentFormStyle.payButton.text = "Pay £54.63"
3737
```
3838
We wouldn't recommend this approach if you're looking to override many values, since you would need to individually identify and change every property. But it can work for small tweaks.
3939

40+
To deactivate the billing address, include the following code lines within the getDefaultPaymentViewController() function in the Factory.swift file:
41+
```swift
42+
paymentFormStyle.editBillingSummary = nil
43+
paymentFormStyle.addBillingSummary = nil
44+
```
45+
4046

4147
### Use Theme
4248
In our Demo projects we also demo this approach in `ThemeDemo.swift`. With the Theme, we are aiming to give you a design system that you can use to create the full UI style by providing a small number of properties that we will share across to sub components. Since you might not fully agree with our mapping, you can still individually change each component afterwards (as in the Modify Default example).

CheckoutTests/Integration/CheckoutAPIServiceIntegrationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ final class CheckoutAPIServiceIntegrationTests: XCTestCase {
139139
XCTAssertNil(tokenDetails.billingAddress)
140140
XCTAssertEqual(tokenDetails.cardCategory, "CONSUMER")
141141
XCTAssertEqual(tokenDetails.cardType, "DEBIT")
142-
XCTAssertEqual(tokenDetails.issuer, "WISE PAYMENTS LIMITED")
142+
XCTAssertEqual(tokenDetails.issuer, "CURVE UK LIMITED")
143143
XCTAssertEqual(tokenDetails.issuerCountry, "GB")
144144
XCTAssertNil(tokenDetails.phone)
145145
XCTAssertEqual(tokenDetails.productId, "MDW")

Frames.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "Frames"
3-
s.version = "4.3.0"
3+
s.version = "4.3.1"
44
s.summary = "Checkout API Client, Payment Form UI and Utilities in Swift"
55
s.description = <<-DESC
66
Checkout API Client and Payment Form Utilities in Swift.

Source/Core/Constants/Constants.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
enum Constants {
99

1010
static let productName = "frames-ios-sdk"
11-
static let version = "4.3.0"
11+
static let version = "4.3.1"
1212
static let userAgent = "checkout-sdk-frames-ios/\(version)"
1313

1414
enum Logging {

Source/UI/PaymentForm/Model/PaymentStyle.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Foundation
99

1010
public struct PaymentStyle {
1111
let paymentFormStyle: PaymentFormStyle
12-
let billingFormStyle: BillingFormStyle
12+
let billingFormStyle: BillingFormStyle?
1313

1414
/**
1515
Define the payment form UI Styling
@@ -19,7 +19,7 @@ public struct PaymentStyle {
1919
- billingFormStyle: UI Styling for the billing form if the user will interact with the address billing
2020
*/
2121
public init(paymentFormStyle: PaymentFormStyle,
22-
billingFormStyle: BillingFormStyle) {
22+
billingFormStyle: BillingFormStyle? = nil) {
2323
self.paymentFormStyle = paymentFormStyle
2424
self.billingFormStyle = billingFormStyle
2525
}

Source/UI/PaymentForm/ViewController/FramesPaymentViewController.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,9 @@ extension FramesPaymentViewController {
344344
paymentViews.append(securityCodeView)
345345
}
346346

347-
if viewModel.paymentFormStyle?.addBillingSummary != nil && viewModel.paymentFormStyle?.editBillingSummary != nil {
347+
if viewModel.billingFormStyle != nil &&
348+
viewModel.paymentFormStyle?.addBillingSummary != nil &&
349+
viewModel.paymentFormStyle?.editBillingSummary != nil {
348350
paymentViews.append(contentsOf: [
349351
addBillingFormButtonView,
350352
billingFormSummaryView])

iOS Example Frame SPM/iOS Example Frame Regression Tests/ExpiryDateEdgeCaseTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ final class ExpiryDateEdgeCaseTests: XCTestCase {
3737
let app = XCUIApplication()
3838
app.launchFrames()
3939

40-
let currentMonth = String(Calendar.current.component(.month, from: Date()))
40+
var currentMonth = String(Calendar.current.component(.month, from: Date()))
4141
let currentYear = String(Calendar.current.component(.year, from: Date())).suffix(2)
4242

4343
let expiryTextField = app.otherElements[AccessibilityIdentifiers.PaymentForm.cardExpiry]
44+
currentMonth = currentMonth.count == 1 ? "0" + currentMonth : currentMonth
4445
app.enterText(currentMonth + currentYear, into: expiryTextField)
4546
app.tapDoneButton()
4647

iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@
12361236
repositoryURL = "https://github.com/checkout/frames-ios";
12371237
requirement = {
12381238
kind = exactVersion;
1239-
version = 4.3.0;
1239+
version = 4.3.1;
12401240
};
12411241
};
12421242
16C3F83E2A7927ED00690639 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = {

iOS Example Frame/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ target 'iOS Example Frame' do
66
use_frameworks!
77

88
# Pods for iOS Example Custom
9-
pod 'Frames', '4.3.0'
9+
pod 'Frames', '4.3.1'
1010

1111
end
1212

iOS Example Frame/iOS Example Frame/Factory/Factory.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,14 @@ enum Factory {
3636
let phone = Phone(number: "77 1234 1234", country: country)
3737

3838
let billingFormData = BillingForm(name: "Bình Inyene", address: address, phone: phone)
39-
39+
4040
let billingFormStyle = FramesFactory.defaultBillingFormStyle
4141

4242
let paymentFormStyle = FramesFactory.defaultPaymentFormStyle
43+
44+
// Comment out below lines to hide billing address (Optional)
45+
// paymentFormStyle.editBillingSummary = nil
46+
// paymentFormStyle.addBillingSummary = nil
4347

4448
let supportedSchemes: [CardScheme] = [.mada, .visa, .mastercard, .maestro, .americanExpress, .discover, .dinersClub, .jcb]
4549

0 commit comments

Comments
 (0)