Pattern:
- Payment Gateway:
{gateway}-payment-service - Credit Gateway:
{gateway}-credit-service
Examples:
zarinpal-payment-servicesadad-payment-servicesibank-credit-service
Pattern: {gateway}-finance-service
Examples:
zarinpal-finance-servicesadad-finance-servicesibank-finance-service
- Simplicity: ✅ Single pattern for all finance services
- Consistency: ✅ All finance services follow the same naming convention
- Scalability: ✅ Easy to add new finance service types without renaming
- Unified Category: ✅ All services in Finance Services category have consistent naming
- Less Complexity: ✅ No need to distinguish between payment/credit in the name
- Future-Proof: ✅ Can accommodate new finance service types (e.g.,
*-finance-servicefor other financial operations)
- Less Specific:
⚠️ Name doesn't indicate payment vs credit - Less Self-Documenting:
⚠️ Need to check documentation to know the service type - Less Descriptive:
⚠️ "finance" is more generic than "payment" or "credit"
- Self-Documenting: ✅ Name clearly indicates service type
- More Descriptive: ✅ Immediately know if it's payment or credit
- Better Discovery: ✅ Easy to find payment vs credit services
- More Complex:
⚠️ Two different patterns to maintain - Less Flexible:
⚠️ Need to decide pattern when adding new services - Potential Confusion:
⚠️ What if a gateway does both payment and credit?
Recommended: Unified *-finance-service ⭐
- Category-Based Organization: Since all services are in the "Finance Services" category, the category itself provides context
- Simplicity: Single pattern is easier to maintain and understand
- Scalability: Can easily add new finance service types without renaming
- Consistency: All finance services follow the same pattern
- Documentation: Service type (payment/credit) can be documented in the service description or README
- Future-Proof: If a gateway provides both payment and credit,
*-finance-servicecovers both
- Pattern:
{gateway-name}-finance-service - Examples:
zarinpal-finance-service(payment gateway)sadad-finance-service(payment gateway)sibank-finance-service(credit gateway)saman-finance-service(payment gateway)- etc.
Since the name doesn't specify payment vs credit, document it in:
- Service Description: In repository description
- README: In each service's README file
- NAMING_STANDARD.md: List which services are payment vs credit
- Service Metadata: Can add tags or labels
| Aspect | Unified *-finance-service |
Specific *-payment-service / *-credit-service |
|---|---|---|
| Simplicity | ⭐⭐⭐ | ⭐⭐ |
| Consistency | ⭐⭐⭐ | ⭐⭐ |
| Self-Documenting | ⭐⭐ | ⭐⭐⭐ |
| Scalability | ⭐⭐⭐ | ⭐⭐ |
| Maintainability | ⭐⭐⭐ | ⭐⭐ |
| Flexibility | ⭐⭐⭐ | ⭐⭐ |
Use *-finance-service for all finance services because:
- It's simpler and more consistent
- All services are in the Finance Services category anyway
- Service type can be documented in description/README
- It's more scalable for future finance service types
- It's easier to maintain a single pattern
The slight loss in self-documentation is acceptable given the benefits of simplicity and consistency.