Skip to content

Commit

Permalink
Trim whitespace for pay link values (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored May 28, 2021
1 parent 31c5c18 commit 09ad755
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Concerns/PerformsCharges.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ protected function generatePayLink(array $payload)

$payload['passthrough'] = json_encode($payload['passthrough']);

$payload = array_map(function ($value) {
return is_string($value) ? trim($value) : $value;
}, $payload);

return Cashier::post('/product/generate_pay_link', $payload)['response']['url'];
}

Expand Down

0 comments on commit 09ad755

Please sign in to comment.