diff --git a/BillingBundle/Service/BillingSrv.php b/BillingBundle/Service/BillingSrv.php index 39d65f0..28e01e1 100644 --- a/BillingBundle/Service/BillingSrv.php +++ b/BillingBundle/Service/BillingSrv.php @@ -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();