This library is custom developed for Ginger API, based on schemas from API.
Should be used with payment plugins or for order creation.
- Creation Order entity with all related entities.
- Post the new order to Ginger API.
- Transactions
- Transaction
- Payment Method
- Transaction
- Description
- Amount
- Customer
- Birthdate
- Address
- Country
- Order Lines
- Line
- Extra
- Client
This entity contains several single transactions, basically no more than 1 transaction.
- To initialize new object :
$transactions = new Transactions(
new Transaction(...)
);
- To add new transaction :
$transactions->addTransaction($transaction);
- To remove transaction by index :
$transactions->removeTransaction($index);
This entity contains general payment information. You should use this entity to tell the API how to process your request.
- To initialize new object :
$transaction = new Transaction(
paymentMethod: "apple-pay"
);
-
To add Payment Method Details there is two ways :
- While initializing
$transaction = new Transaction( paymentMethod: "ideal", paymentMethodDetails: new PaymentMethodDetails(...) );
- Through std object exemplar, in way of expanding its properties (for now only with prepared for payment methods).
$transaction->getPaymentMethodDetails()->setPaymentMethodDetailsIdeal();
-
To receive a Payment Method Details :
$transaction->getPaymentMethodDetails();
This field should be used to store payment name.
This entity contains additional payload for payment method, such as issuer id, hosted fields data
or data for recurring payments.
- For now, only string types of attributes values are supported.