Skip to content

Commit

Permalink
Improve the handling of Mollie mandate requests on the mandate detail…
Browse files Browse the repository at this point in the history
… page.

Fixes pronamic/pronamic.shop#52.
  • Loading branch information
remcotolsma committed Jun 4, 2024
1 parent 79e5f5e commit 9f23324
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions views/page-mandate.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,18 @@
if ( $api_key ) {
$client = new Client( $api_key );

/**
* Mandate.
*
* @link https://docs.mollie.com/reference/v2/mandates-api/get-mandate
*/
$response = $client->get_mandate( $mollie_mandate_id, $mollie_customer_id );

$mollie_mandate = $response;
try {
/**
* Mandate.
*
* @link https://docs.mollie.com/reference/v2/mandates-api/get-mandate
*/
$response = $client->get_mandate( $mollie_mandate_id, $mollie_customer_id );

$mollie_mandate = $response;
} catch ( \Exception $e ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch
// No problem, in case of an error we will not show the remote information.
}
}

?>
Expand Down

0 comments on commit 9f23324

Please sign in to comment.