diff --git a/Gemfile.lock b/Gemfile.lock index 79ad990..70913c9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - zai_payment (2.6.0) + zai_payment (2.6.1) base64 (~> 0.3.0) faraday (~> 2.0) openssl (~> 3.3) diff --git a/changelog.md b/changelog.md index ca9c9a4..51ea54e 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,14 @@ ## [Released] +## [2.6.1] - 2025-11-03 + +### Fixed +- **BPay Account Endpoint Configuration**: Fixed 403 CloudFront error when creating BPay accounts + - Changed BPay accounts resource to use `:va_base` endpoint instead of `:core_base` + - The `:core_base` endpoint only supports GET requests (cacheable), causing POST requests to fail + - BPay accounts now correctly use the virtual accounts endpoint that supports all HTTP methods + - Resolves issue where `bpay_accounts.create()` returned "The distribution supports only cachable requests" error + ## [2.6.0] - 2025-11-03 ### Added diff --git a/lib/zai_payment.rb b/lib/zai_payment.rb index 1c31ce2..53994d1 100644 --- a/lib/zai_payment.rb +++ b/lib/zai_payment.rb @@ -67,7 +67,7 @@ def bank_accounts # @return [ZaiPayment::Resources::BpayAccount] bpay_account resource instance def bpay_accounts - @bpay_accounts ||= Resources::BpayAccount.new(client: Client.new(base_endpoint: :core_base)) + @bpay_accounts ||= Resources::BpayAccount.new(client: Client.new(base_endpoint: :va_base)) end end end diff --git a/lib/zai_payment/version.rb b/lib/zai_payment/version.rb index 43ac7ce..d9776f7 100644 --- a/lib/zai_payment/version.rb +++ b/lib/zai_payment/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ZaiPayment - VERSION = '2.6.0' + VERSION = '2.6.1' end