widerrufsbelehrung hinzugefügt und in den checkout mit eingebunden. refund ins backend eingebaut.
This commit is contained in:
@@ -33,6 +33,21 @@ class PaddleTransactionService
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Issue a refund for a Paddle transaction.
|
||||
*
|
||||
* @param array{reason?: string|null} $options
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function refund(string $transactionId, array $options = []): array
|
||||
{
|
||||
$payload = array_filter([
|
||||
'reason' => $options['reason'] ?? null,
|
||||
], static fn ($value) => $value !== null && $value !== '');
|
||||
|
||||
return $this->client->post("/transactions/{$transactionId}/refunds", $payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $transaction
|
||||
* @return array<string, mixed>
|
||||
|
||||
Reference in New Issue
Block a user