Skip to content

Commit 62ef773

Browse files
authored
Merge pull request #4 from paytrail/update-request-encoding
Update request encoding
2 parents 39086ab + 05cd954 commit 62ef773

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

paytrail-ios-sdk.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |spec|
22

33
spec.name = "paytrail-ios-sdk"
4-
spec.version = "1.0.0-beta4"
4+
spec.version = "1.0.0-beta5"
55
spec.summary = "Paytrail Mobile SDK for iOS"
66
spec.description = <<-DESC
77
Paytrail iOS SDK providing the major payment features for easy mobile payments.

paytrail-ios-sdk/PublicAPIs/PaymentsAPIs/CreatePaymentAPI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public class PaytrailPaymentAPIs: PaytrailBaseAPIs {
7171
var request = URLRequest(url: url)
7272
request.httpMethod = HTTPMethod.post.rawValue
7373
request.allHTTPHeaderFields = ["content-type": "application/x-www-form-urlencoded"]
74-
guard let body = urlComponent.query?.data(using: .utf8), !body.isEmpty else {
74+
guard let body = urlComponent.percentEncodedQuery?.data(using: .utf8), !body.isEmpty else {
7575
PTLogger.log(message: "Failed initiate payment request, reason: empty request body.", level: .error)
7676
return nil
7777
}

0 commit comments

Comments
 (0)