Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ It provides a clean, object-oriented interface for payment processing, subscript
- Handles authentication via HMAC-SHA512 signatures
- Provides methods for all Solidgate API endpoints:
- Payment operations: `create_payment`, `get_payment`, `capture_payment`, `void_payment`, `refund_payment`, `settle_payment`
- Subscription operations: `create_subscription`, `subscription_status`, `switch_subscription_product`, `update_subscription_pause`, `create_subscription_pause`, `delete_subscription_pause`, `cancel_subscription`, `restore_subscription`
- Subscription operations: `create_subscription`, `subscription_status`, `switch_subscription_product`, `update_subscription_pause`, `create_subscription_pause`, `delete_subscription_pause`, `cancel_subscription`, `restore_subscription`, `update_subscription_payment_method`
- Product operations: `create_product`, `update_product`, `create_price`, `products`, `product_prices`, `update_product_price`
- Utility methods: `generate_intent`, `generate_signature`, `refund`, `order_status`
- Utility methods: `generate_intent`, `generate_signature`, `refund`, `alt_refund`, `order_status`, `apm_order_status`, `make_card_recurring`, `make_apm_recurring`
- Private methods for HTTP operations: `get`, `post`, `patch`, `delete`, `request`
- Encryption: `encrypt_payload` for payment intent generation (AES-256-CBC)

Expand Down Expand Up @@ -65,7 +65,7 @@ It provides a clean, object-oriented interface for payment processing, subscript
- `Solidgate::ValidationError` - Parameter validation (includes errors hash)

#### `lib/solidgate/version.rb`
- Version constant: `Solidgate::VERSION = "0.1.17"`
- Version constant: `Solidgate::VERSION = "0.2.0"`

### Test Structure

Expand Down
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.2.0] - 2026-05-05
### Added
- `apm_order_status` endpoint for checking alternative payment method order status.
- Spec coverage for previously untested client methods added in this worktree.

### Fixed
- Recurring payment spec coverage bug affecting the recurring endpoint test suite.

### Changed
- Documentation updates and version bump for the `0.2.0` release.

## [0.1.17] - 2026-03-03
### Added
- `update_product` endpoint (`Solidgate::Client#update_product`) to modify product attributes.
Expand All @@ -18,6 +29,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- `alt_refund` endpoint to create refunds using an alternative payment method (`Solidgate::Client#alt_refund`).

## [0.1.15] - 2026-02-20
### Added
- `make_apm_recurring` endpoint to create recurring alternative payment method charges (`Solidgate::Client#make_apm_recurring`).

## [0.1.14] - 2026-02-17
### Added
- `make_card_recurring` endpoint to create recurring card charges (`Solidgate::Client#make_card_recurring`).

## [0.1.13] - 2026-02-13
### Added
- `order_status` endpoint to check order/payment status on `pay.solidgate.com` (`Solidgate::Client#order_status`).
Expand Down Expand Up @@ -75,9 +94,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Thread-safe configuration
- Comprehensive documentation and examples

[Unreleased]: https://github.com/carrfane/solidgate-ruby-sdk/compare/v0.1.17...HEAD
[Unreleased]: https://github.com/carrfane/solidgate-ruby-sdk/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/carrfane/solidgate-ruby-sdk/compare/v0.1.17...v0.2.0
[0.1.17]: https://github.com/carrfane/solidgate-ruby-sdk/releases/tag/v0.1.17
[0.1.16]: https://github.com/carrfane/solidgate-ruby-sdk/releases/tag/v0.1.16
[0.1.15]: https://github.com/carrfane/solidgate-ruby-sdk/compare/v0.1.14...v0.1.15
[0.1.14]: https://github.com/carrfane/solidgate-ruby-sdk/compare/v0.1.13...v0.1.14
[0.1.13]: https://github.com/carrfane/solidgate-ruby-sdk/releases/tag/v0.1.13
[0.1.12]: https://github.com/carrfane/solidgate-ruby-sdk/releases/tag/v0.1.12
[0.1.11]: https://github.com/carrfane/solidgate-ruby-sdk/releases/tag/v0.1.11
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
solidgate-ruby-sdk (0.1.17)
solidgate-ruby-sdk (0.2.0)
faraday
faraday-multipart

Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,32 @@ client.refund_payment('payment_id_123', amount: 500, reason: 'Customer requested
# Refund by order ID (pay.solidgate.com)
client.refund(order_id: 'order_123', amount: 1000)

# Refund an alternative payment method order (gate.solidgate.com)
client.alt_refund(order_id: 'apm_order_123', amount: 750)

# Check order status (pay.solidgate.com)
client.order_status(order_id: 'order_123')

# Check alternative payment method order status (gate.solidgate.com)
client.apm_order_status(order_id: 'apm_order_123')

# Charge a saved card payment method for a recurring payment
client.make_card_recurring(
order_id: 'renewal_order_123',
amount: 1999,
currency: 'USD',
customer_email: 'customer@example.com',
token: 'card_tok_abc123'
)

# Charge a saved APM payment method for a recurring payment
client.make_apm_recurring(
order_id: 'apm_renewal_123',
amount: 1499,
currency: 'EUR',
customer_email: 'customer@example.com',
token: 'apm_tok_xyz789'
)
```

### Subscription Management
Expand Down
7 changes: 4 additions & 3 deletions docs/payment-integration-guide.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Solidgate Ruby SDK Integration Guide (Payments)

> Target version: `solidgate-ruby-sdk` `0.1.17`
> Target version: `solidgate-ruby-sdk` `0.2.0`
> Audience: engineers and LLM agents integrating Solidgate payments in Ruby apps.

## 1) What this SDK provides
Expand Down Expand Up @@ -107,11 +107,12 @@ refunded = client.refund_payment(payment_id, amount: 300, reason: "partial_refun
- `void_payment(payment_id)` -> `POST /v1/charge/:payment_id/void`
- `refund_payment(payment_id, params = {})` -> `POST /v1/charge/:payment_id/refund`

### Refund/status via pay domain
### Refund and status helper routes

- `refund(params)` -> `POST https://pay.solidgate.com/api/v1/refund`
- typically `order_id`, optional `amount`
- `order_status(params)` -> `POST https://pay.solidgate.com/api/v1/status`
- `apm_order_status(params)` -> `POST https://gate.solidgate.com/api/v1/status`

### Alternative payment routes

Expand Down Expand Up @@ -242,7 +243,7 @@ If an LLM agent is integrating this SDK into another project, follow this sequen

---

## 10) Known quirks in current SDK (v0.1.17)
## 10) Known quirks in current SDK (v0.2.0)

- `settle_payment` currently does **not** call an API endpoint; it returns `config.api_url`.
- `README.md` examples may not fully match actual method signatures in code.
Expand Down
14 changes: 14 additions & 0 deletions lib/solidgate/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,20 @@ def order_status(params)
post('/api/v1/status', body: params, base_url: "https://pay.solidgate.com")
end

# Retrieves order status from the Solidgate gate domain for APM transactions.
#
# @param params [Hash] status request parameters:
# - :order_id [String] unique order identifier
# - :payment_id [String] optional payment identifier
# @return [Hash] order status response
# @raise [InvalidRequestError] if params are invalid
#
# @example Get APM order status
# client.apm_order_status(order_id: 'order_123')
def apm_order_status(params)
post('/api/v1/status', body: params, base_url: "https://gate.solidgate.com")
end

def make_card_recurring(params)
post('/api/v1/recurring', body: params, base_url: "https://pay.solidgate.com")
end
Expand Down
2 changes: 1 addition & 1 deletion lib/solidgate/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Solidgate
VERSION = "0.1.17"
VERSION = "0.2.0"
end
Loading
Loading