Skip to content

Conversation

@nicolas-eoxia
Copy link
Member

No description provided.

@nicolas-eoxia nicolas-eoxia self-assigned this Feb 19, 2025
@nicolas-eoxia nicolas-eoxia added 2 Enhancement New feature or request labels Feb 19, 2025
* @param string $urlMethod Url method
* @return int|stdClass 0 < on error, data object on success
*/
function init_easy_url_curl(array $curlPostFields, string $urlMethod = 'yourls')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

peut être la fonction parce que init curl ça peut vouloir dire que tu init juste l'objet curl sans faire la requête alors là tu fais la requête.
Suggestion : easy_url_post comme nouveau nom de fonction ?

// Fetch and return content
$data = curl_exec($ch);
curl_close($ch);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rajouter une gestion d'erreur parce que si il y a une erreur il a peut être pas forcément de body en json

foreach ($objects as $object) {
$urlTypes = ['signature', 'payment'];
foreach ($urlTypes as $urlType) {
if (isset($object->array_options['options_easy_url_' . $urlType . '_link']) && !empty($object->array_options['options_easy_url_' . $urlType . '_link'])) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi ne pas utiliser !empty() pour les deux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants