Bonjour, j'ai trouvé un script pour les remboursements Paypal mais il ne fonctionne pas, connaissez-vous?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 use PayPal\Api\Amount; use PayPal\Api\Refund; use PayPal\Api\Sale; $amt = new Amount(); $amt->setTotal(1.10) ->setCurrency('CHF'); $refund = new Refund(); $refund->setAmount($amt); $sale = new Sale(); $sale->setId("57N78393R10602605"); try { $refundedSale = $sale->refund($refund, $apiContext); } catch (PayPal\Exception\PayPalConnectionException $ex) { echo $ex->getCode(); echo $ex->getData(); die($ex); } catch (Exception $ex) { die($ex); }
Partager