malipopay 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CLAUDE.md +3 -3
- data/changes.md +13 -0
- data/lib/malipopay/version.rb +1 -1
- data/lib/malipopay/webhooks/verifier.rb +5 -0
- data/malipopay.gemspec +1 -1
- metadata +5 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 29096202a62f72b26f2ccd61c3c991b38d79b5652fe55409403b8fb06c330970
|
|
4
|
+
data.tar.gz: a86812eae12f970ad387a5d94886e9bb3552fb47d485c5e87f9c13005000963a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97ae8a7f70e734fd2de4da944ba317d0e171f97eae26b23dcea85371ee3a59fa849e1b5ff25b36918b402f310f179b56553dcadc3fae029c78e8be69baa3f7fd
|
|
7
|
+
data.tar.gz: 3c8a4f2098c4c7df9f1fc94112f2aad64440a782e05ee67ba41edbd9b1f0ad3512ba7eae56c608fcd2d2f6939bb847c8ea2f234d604588da0754c6eb030f1465
|
data/CLAUDE.md
CHANGED
|
@@ -39,8 +39,8 @@ $client = new Malipopay("api-key");
|
|
|
39
39
|
|
|
40
40
|
```java
|
|
41
41
|
// Java
|
|
42
|
-
import co.
|
|
43
|
-
import co.
|
|
42
|
+
import tz.co.malipopay.Malipopay;
|
|
43
|
+
import tz.co.malipopay.MalipopayConfig;
|
|
44
44
|
Malipopay client = new Malipopay("api-key");
|
|
45
45
|
```
|
|
46
46
|
|
|
@@ -76,7 +76,7 @@ https://github.com/Malipopay
|
|
|
76
76
|
| Node.js | `malipopay` | npm |
|
|
77
77
|
| Python | `malipopay` | PyPI |
|
|
78
78
|
| PHP | `malipopay/malipopay-php` | Packagist |
|
|
79
|
-
| Java | `co.
|
|
79
|
+
| Java | `tz.co.malipopay:malipopay-java` | Maven Central |
|
|
80
80
|
| .NET | `Malipopay` | NuGet |
|
|
81
81
|
| Ruby | `malipopay` | RubyGems |
|
|
82
82
|
|
data/changes.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# changes
|
|
2
|
+
|
|
3
|
+
What shipped in malipopay-ruby and why, newest first, one entry per merged PR.
|
|
4
|
+
|
|
5
|
+
## 2026-11-08 · #2 · Release 1.1.1
|
|
6
|
+
**Why.** The webhook signature fix (#1) was merged to main but RubyGems still served 1.1.0, so merchants installing the gem kept the bug.
|
|
7
|
+
**What changed.** `Malipopay::VERSION` is 1.1.1. The gem's changelog link now points at this file (it pointed at a CHANGELOG.md that never existed).
|
|
8
|
+
**Related:** malipopay-ruby#1
|
|
9
|
+
|
|
10
|
+
## 2026-10-29 · #1 · Accept the sha256= prefix on X-Malipopay-Signature
|
|
11
|
+
**Why.** central-api sends `X-Malipopay-Signature: sha256=<hex>`, and the verifier compared the whole header against the bare hex digest, so every genuine webhook failed verification.
|
|
12
|
+
**What changed.** The verifier strips an optional `sha256=` prefix before the constant-time compare; a bare hex header still verifies.
|
|
13
|
+
**Memory:** ../memory/project_malipopay_webhook_signature.md
|
data/lib/malipopay/version.rb
CHANGED
|
@@ -20,6 +20,11 @@ module Malipopay
|
|
|
20
20
|
def verify(payload, signature, timestamp: nil)
|
|
21
21
|
return false if signature.nil? || signature.empty?
|
|
22
22
|
|
|
23
|
+
# The X-Malipopay-Signature header carries a "sha256=" prefix
|
|
24
|
+
# (matching the Node/PHP/Python SDKs). Strip it before comparing.
|
|
25
|
+
signature = signature.delete_prefix("sha256=")
|
|
26
|
+
return false if signature.empty?
|
|
27
|
+
|
|
23
28
|
if timestamp
|
|
24
29
|
ts = timestamp.to_i
|
|
25
30
|
return false if (Time.now.to_i - ts).abs > TOLERANCE_IN_SECONDS
|
data/malipopay.gemspec
CHANGED
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
|
19
19
|
|
|
20
20
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
21
21
|
spec.metadata["source_code_uri"] = spec.homepage
|
|
22
|
-
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/
|
|
22
|
+
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/changes.md"
|
|
23
23
|
spec.metadata["documentation_uri"] = "https://docs.malipopay.co.tz"
|
|
24
24
|
|
|
25
25
|
spec.files = Dir.chdir(__dir__) do
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: malipopay
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lockwood Technology Ltd
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: faraday
|
|
@@ -122,6 +121,7 @@ files:
|
|
|
122
121
|
- LICENSE
|
|
123
122
|
- README.md
|
|
124
123
|
- Rakefile
|
|
124
|
+
- changes.md
|
|
125
125
|
- docs/configuration.md
|
|
126
126
|
- docs/customers.md
|
|
127
127
|
- docs/error-handling.md
|
|
@@ -151,9 +151,8 @@ licenses:
|
|
|
151
151
|
metadata:
|
|
152
152
|
homepage_uri: https://github.com/malipopay/malipopay-ruby
|
|
153
153
|
source_code_uri: https://github.com/malipopay/malipopay-ruby
|
|
154
|
-
changelog_uri: https://github.com/malipopay/malipopay-ruby/blob/main/
|
|
154
|
+
changelog_uri: https://github.com/malipopay/malipopay-ruby/blob/main/changes.md
|
|
155
155
|
documentation_uri: https://docs.malipopay.co.tz
|
|
156
|
-
post_install_message:
|
|
157
156
|
rdoc_options: []
|
|
158
157
|
require_paths:
|
|
159
158
|
- lib
|
|
@@ -168,8 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
168
167
|
- !ruby/object:Gem::Version
|
|
169
168
|
version: '0'
|
|
170
169
|
requirements: []
|
|
171
|
-
rubygems_version:
|
|
172
|
-
signing_key:
|
|
170
|
+
rubygems_version: 4.0.11
|
|
173
171
|
specification_version: 4
|
|
174
172
|
summary: Official Ruby SDK for the Malipopay payment platform
|
|
175
173
|
test_files: []
|