Skip to content

Commit

Permalink
Add functionality to send SDK version (#86)
Browse files Browse the repository at this point in the history
* introduce client SDK version in the request header

* resolve bug on sending card_holder_mobile_number
  • Loading branch information
adhiartaputra authored Sep 13, 2024
1 parent edfada8 commit 315fd26
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Slack Mentions: `@troops-cards`
Add this to your Podfile.

```ruby
pod 'Xendit', '~> 3.9.1'
pod 'Xendit', '~> 3.9.2'
```

**Important:** Import SDK in Objective-C project with CocoaPods integration, you can do as following
Expand Down
2 changes: 1 addition & 1 deletion Sources/Xendit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.9.1</string>
<string>3.9.2</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Xendit/Models/DTOs/XenditTokenizationRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import Foundation
}

if let phoneNumber = cardData.cardHolderPhoneNumber, !phoneNumber.isEmpty {
cardDataJson["card_holder_mobile_number"] = phoneNumber
cardDataJson["card_holder_phone_number"] = phoneNumber
}

if cardData.cardCvn != nil && cardData.cardCvn != "" {
Expand Down
3 changes: 2 additions & 1 deletion Sources/Xendit/XDTApiClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ extension URLRequest {
request.setValue(XDTApiClient.CLIENT_TYPE, forHTTPHeaderField: "client-type")
request.setValue(XDTApiClient.CLIENT_API_VERSION, forHTTPHeaderField: "client-version")
request.setValue(XDTApiClient.CLIENT_IDENTIFIER, forHTTPHeaderField: "x-client-identifier")
request.setValue(XDTApiClient.CLIENT_SDK_VERSION, forHTTPHeaderField: "x-client-sdk-version")

if extraHeaders != nil {
for (key, value) in extraHeaders! {
Expand All @@ -37,7 +38,7 @@ class XDTApiClient {
internal static let CLIENT_TYPE = "SDK";
internal static let CLIENT_API_VERSION = "2.0.0";
internal static let CLIENT_IDENTIFIER = "Xendit iOS SDK";
internal static let CLIENT_SDK_VERSION = "3.8.7";
internal static let CLIENT_SDK_VERSION = "3.9.2";

private static let WEBAPI_FLEX_BASE_URL = "https://sandbox.webapi.visa.com"

Expand Down
2 changes: 1 addition & 1 deletion Xendit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Xendit'
s.version = '3.9.1'
s.version = '3.9.2'
s.license = 'MIT'
s.homepage = 'https://www.xendit.co'
s.author = { 'Juan Gonzalez’' => '[email protected]' }
Expand Down

0 comments on commit 315fd26

Please sign in to comment.