Skip to content

Commit

Permalink
Merge pull request #51 from pronamic/issue-pronamic-shop-52-mollie-ma…
Browse files Browse the repository at this point in the history
…ndate

Improve the handling of Mollie mandate requests on the mandate detail…
  • Loading branch information
remcotolsma authored Jun 5, 2024
2 parents 79e5f5e + 9f23324 commit 8a49733
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 8a49733

Please sign in to comment.