# Stubs

This folder contains **example implementations** of the required contracts 
(like `ConfigAbstract`, `OrderAbstract`, etc.).

⚠️ **Important**: These classes are **not meant for production use**.  
They only exist so you can run the examples and understand how the contracts work.  
You must implement these contracts yourself or use one of the provided adapters.

---

## When to use the stubs

- If you are running the SDK **standalone** (without Magento, PrestaShop, or WooCommerce).
- If you just want to run the code inside `examples/` without connecting to a real shop.

In this case, you can use:
 
- `order.php` – minimal example of an order that implements `OrderAbstract`.

---

## Adapters for real shops

If you are using the SDK inside a supported e-commerce platform, you **don’t need `DemoOrder`**.  
Instead, use the corresponding adapter class:

- **Magento** → `Sibs\PaymentGateway\Adapters\Magento\OrderAdapter`
- **PrestaShop** → `Sibs\PaymentGateway\Adapters\PrestaShop\OrderAdapter`
- **WooCommerce** → `Sibs\PaymentGateway\Adapters\WooCommerce\OrderAdapter`

These adapters already implement `OrderAbstract` and map the platform’s native order objects.  
For example, in Magento:

```php
use Sibs\PaymentGateway\Adapters\Magento\OrderAdapter as MagentoOrderAdapter;

$adapter = new MagentoOrderAdapter($magentoOrder);
```
