Creating transactions

You will receive a payment method nonce when your client successfully tokenizes your customer's payment information. Pass this nonce to your server and create a transaction:

$result = $gateway->transaction()->sale([
  'amount' => '10.00',
  'paymentMethodNonce' => nonceFromTheClient,
  'options' => [
    'submitForSettlement' => True

if ($result->success) {
  // See $result->transaction for details
} else {
  // Handle errors
This code snippet now uses gateway instance methods instead of class-level methods. Learn more.

Delayed settlement

If the UnionPay card is not a debit card, you can choose to submit the transaction for settlement separately. This can be helpful if you have a delayed order fulfillment process and prefer to wait to settle the transaction until you're ready to provide your goods or services.

For details on this transaction flow, see the Transaction::submitForSettlement() reference.

Next Page: Testing →

Still have questions?

If you can’t find an answer, contact our Support team