【发布时间】:2015-04-03 20:13:32
【问题描述】:
我正在使用PHP的PayPal SDK,我正在尝试取消发票,返回结果为“true”,没有返回异常,但发票没有取消。请你告诉我我的代码是否有错误?
$Invoice = new Invoice();
try {
$invoice = $Invoice->get($id_invoice, $apiContext);
$notify = new CancelNotification();
$notify->setSubject("Past due")
->setNote("Canceling invoice")
->setSendToMerchant(true)
->setSendToPayer(true);
$result = $Invoice->cancel($notify, $apiContext);
} catch (Exception $ex) {
$result = self::getException($ex);
}
return $result;
【问题讨论】: