Skip to content

Latest commit

 

History

History
26 lines (23 loc) · 809 Bytes

PAYMENT.md

File metadata and controls

26 lines (23 loc) · 809 Bytes

Creating payment

To pay the charge you must use the createPayment function, but you must define if the payment method is bol or credit card.

  • If the method is bol:
$response = $apiGN->createPayment()
                  ->chargeId($chargeId)
                  ->method('bol')
                  ->expireAt('2015-12-31') // This date is optional
                  ->run()
                  ->response();
  • If the method is credit card:
$paymentToken = 'payment_token';
$response = $apiGN->createPayment()
                  ->chargeId($chargeId)
                  ->method('credit_card')
                  ->installments(3)
                  ->paymentToken($paymentToken)
                  ->billingAddress($address)
                  ->run()
                  ->response();