Documentation

PaymentService

Class PaymentService

Provides services related to Payment management for Pelanggan.

Table of Contents

Methods

createVA()  : Payment|null
Create a Virtual Account (VA) payment for the given bill tokens and bank ID.
simulatePayment()  : array<string|int, mixed>
Simulate a payment callback for testing purposes.

Methods

createVA()

Create a Virtual Account (VA) payment for the given bill tokens and bank ID.

public createVA(array<string|int, mixed> $billTokens, int $bankId) : Payment|null
Parameters
$billTokens : array<string|int, mixed>

Array of bill tokens to be paid.

$bankId : int

The ID of the bank for the VA payment.

Return values
Payment|null

The created Payment object or null if creation failed.

simulatePayment()

Simulate a payment callback for testing purposes.

public simulatePayment(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>

The payment data to simulate.

Return values
array<string|int, mixed>

The response data from the simulation.


        
On this page

Search results