add method to confirm payment
This commit is contained in:
parent
8578b07f7e
commit
a553d74f48
|
@ -41,6 +41,13 @@ class BillingSrv
|
|||
);
|
||||
}
|
||||
|
||||
public function confirmPayment($paimentIntent)
|
||||
{
|
||||
$infoIntent = $this->retrievePurchase($paimentIntent);
|
||||
|
||||
return ($infoIntent['amount'] == $infoIntent['amount_received'] && $infoIntent['amount_capturable'] == 0);
|
||||
}
|
||||
|
||||
public function retrievePurchase($paimentIntent)
|
||||
{
|
||||
$this->setApiKey();
|
||||
|
|
Loading…
Reference in New Issue