Skip to content

Commit

Permalink
Merge pull request #4 from paytrail/update-request-encoding
Browse files Browse the repository at this point in the history
Update request encoding
  • Loading branch information
kotivuori authored Nov 29, 2024
2 parents 39086ab + 05cd954 commit 62ef773
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion paytrail-ios-sdk.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |spec|

spec.name = "paytrail-ios-sdk"
spec.version = "1.0.0-beta4"
spec.version = "1.0.0-beta5"
spec.summary = "Paytrail Mobile SDK for iOS"
spec.description = <<-DESC
Paytrail iOS SDK providing the major payment features for easy mobile payments.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class PaytrailPaymentAPIs: PaytrailBaseAPIs {
var request = URLRequest(url: url)
request.httpMethod = HTTPMethod.post.rawValue
request.allHTTPHeaderFields = ["content-type": "application/x-www-form-urlencoded"]
guard let body = urlComponent.query?.data(using: .utf8), !body.isEmpty else {
guard let body = urlComponent.percentEncodedQuery?.data(using: .utf8), !body.isEmpty else {
PTLogger.log(message: "Failed initiate payment request, reason: empty request body.", level: .error)
return nil
}
Expand Down

0 comments on commit 62ef773

Please sign in to comment.