Skip to content

Commit 9b90e50

Browse files
authored
Merge pull request #34 from Sentia/feature/fix-prod-url
update prod url
2 parents 00edf16 + 9976660 commit 9b90e50

6 files changed

Lines changed: 21 additions & 22 deletions

File tree

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
zai_payment (2.8.5)
4+
zai_payment (2.8.6)
55
base64 (~> 0.3.0)
66
faraday (~> 2.0)
77
openssl (~> 3.3)

changelog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
## [Released]
22

3+
## [2.8.6] - 2025-12-12
4+
5+
### Fixed
6+
- **Production API Endpoints**: Fixed incorrect production URL configuration 🔧
7+
- Corrected `core_base` endpoint to use `https://secure.api.promisepay.com` (was incorrectly set to assemblypay.com)
8+
- Corrected `va_base` endpoint to use `https://au-0000.api.assemblypay.com` (was incorrectly set to promisepay.com)
9+
- Removed deprecated `webhook_base_endpoint` method from Config class
10+
- Production environment now uses correct endpoints for core API and virtual accounts
11+
- Ensures proper routing of production API requests to Zai servers
12+
13+
**Full Changelog**: https://github.com/Sentia/zai-payment/compare/v2.8.5...v2.8.6
14+
315
## [2.8.5] - 2025-12-12
416

517
### Fixed

lib/zai_payment.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def token_type = auth.token_type
4646
# --- Resource accessors ---
4747
# @return [ZaiPayment::Resources::Webhook] webhook resource instance
4848
def webhooks
49-
@webhooks ||= Resources::Webhook.new(client: Client.new(base_endpoint: config.webhook_base_endpoint))
49+
@webhooks ||= Resources::Webhook.new(client: Client.new(base_endpoint: :va_base))
5050
end
5151

5252
# @return [ZaiPayment::Resources::User] user resource instance

lib/zai_payment/config.rb

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,13 @@ def endpoints
3131
}
3232
when :production
3333
{
34-
core_base: 'https://au-0000.api.assemblypay.com',
35-
va_base: 'https://secure.api.promisepay.com',
34+
core_base: 'https://secure.api.promisepay.com',
35+
va_base: 'https://au-0000.api.assemblypay.com',
3636
auth_base: 'https://au-0000.auth.assemblypay.com'
3737
}
3838
else
3939
raise "Unknown environment: #{environment}"
4040
end
4141
end
42-
43-
# Returns the appropriate webhook base endpoint based on environment
44-
# Production uses core_base, prelive uses va_base
45-
def webhook_base_endpoint
46-
case environment.to_sym
47-
when :production
48-
:core_base
49-
when :prelive
50-
:va_base
51-
else
52-
raise "Unknown environment: #{environment}"
53-
end
54-
end
5542
end
5643
end

lib/zai_payment/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module ZaiPayment
4-
VERSION = '2.8.5'
4+
VERSION = '2.8.6'
55
end

spec/zai_payment/config_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@
157157

158158
it 'returns production endpoints' do
159159
expect(config.endpoints).to eq(
160-
core_base: 'https://au-0000.api.assemblypay.com',
161-
va_base: 'https://secure.api.promisepay.com',
160+
core_base: 'https://secure.api.promisepay.com',
161+
va_base: 'https://au-0000.api.assemblypay.com',
162162
auth_base: 'https://au-0000.auth.assemblypay.com'
163163
)
164164
end
@@ -169,8 +169,8 @@
169169

170170
it 'returns production endpoints' do
171171
expect(config.endpoints).to eq(
172-
core_base: 'https://au-0000.api.assemblypay.com',
173-
va_base: 'https://secure.api.promisepay.com',
172+
core_base: 'https://secure.api.promisepay.com',
173+
va_base: 'https://au-0000.api.assemblypay.com',
174174
auth_base: 'https://au-0000.auth.assemblypay.com'
175175
)
176176
end

0 commit comments

Comments
 (0)