Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const PAYMENT_METHOD_ALL = 'all';
- const PAYMENT_METHOD_CREDIT_CARD = 'credit_card';
- const PAYMENT_METHOD_BANK_SLIP = 'bank_slip';
- $data = [
- 'email' => $paymentUser->getEmail(),
- 'due_date' => $dueDate->format('Y-m-d'),
- 'ensure_workday_due_date' => false,
- 'items' => [
- [
- 'description' => $description,
- 'quantity' => 1,
- 'price_cents' => round($finalValue * 100) // nunca dê cast para int, isso pode dar problemas com precisão (int) (9.45 * 100) != 945
- ],
- [
- 'description' => 'Taxa do boleto',
- 'quantity' => 1,
- 'price_cents' => round($this->taxaBoleto * 100) // nunca dê cast para int, isso pode dar problemas com precisão (int) (9.45 * 100) != 945
- ]
- ],
- 'payable_with' => self::PAYMENT_METHOD_ALL,
- 'payer' => $paymentUser->getPayerData()
- ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement