Skip to main content

Sources

Create Source#

Creates a source to let the user pay using their Gcash Accounts or Grab Pay Accounts.

Payload#

Refer to Paymongo documentation for payload guidelines.

Sample#

use Luigel\Paymongo\Facades\Paymongo;
$gcashSource = Paymongo::source()->create([    'type' => 'gcash',    'amount' => 100.00,    'currency' => 'PHP',    'redirect' => [        'success' => 'https://your-domain.com/success',        'failed' => 'https://your-domain.com/failed'    ]]);
$grabCarSource = Paymongo::source()->create([    'type' => 'grab_pay',    'amount' => 100.00,    'currency' => 'PHP',    'redirect' => [        'success' => 'https://your-domain.com/success',        'failed' => 'https://your-domain.com/failed'    ]]);