Class InstallmentsRequest
Pagarme Calculate Installments Request
You can use Pagar.me API to calculate installments for a purchase.
// Do a GET request on the gateway $transaction = $gateway->calculateInstallments(array( 'max_installments' => 12, 'free_installments' => 3, 'interest_rate' => 1.12, 'amount' => '1200.00', )); $response = $transaction->send(); if ($response->isSuccessful()) { echo "Calculate Installments request was successful!\n"; $installments = $response->getCalculatedInstallments(); echo "Calculated Installments = " . $installments . "\n"; }
- Omnipay\Common\Message\AbstractRequest
- Omnipay\Pagarme\Message\AbstractRequest
- Omnipay\Pagarme\Message\InstallmentsRequest
Namespace: Omnipay\Pagarme\Message
See:
Link: https://docs.pagar.me/api/?shell#estados-das-transaes
Located at Message/InstallmentsRequest.php
See:
Omnipay\Pagarme\Gateway
Link: https://docs.pagar.me/api/?shell#estados-das-transaes
Located at Message/InstallmentsRequest.php
Methods summary
public
float
|
|
public
|
|
public
integer
|
|
public
|
|
public
integer
|
|
public
|
|
public
string
|
|
public
|
|
public
|
Methods inherited from Omnipay\Pagarme\Message\AbstractRequest
createResponse()
,
extractAddress()
,
extractDddPhone()
,
getApiKey()
,
getCard()
,
getCardData()
,
getCardHash()
,
getCustomer()
,
getCustomerData()
,
getCustomerReference()
,
getMetadata()
,
insertApiKeyToData()
,
sendData()
,
setApiKey()
,
setCard()
,
setCardHash()
,
setCustomer()
,
setCustomerReference()
,
setMetadata()