-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[doc] add doc on how to cancel recuring payment.r
- Loading branch information
Showing
3 changed files
with
56 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Cancel recurring payment. | ||
|
||
In the chapter [recurring payments basics](recurring-payments-basics.md) we showed how to configure create a recurring. | ||
Here we show you how to cancel a recurring payment. | ||
|
||
```php | ||
<?php | ||
use Payum\Core\Request\Cancel; | ||
use Payum\Core\Request\Sync; | ||
use Payum\Core\Request\GetHumanStatus; | ||
|
||
|
||
$payment->execute(new Cancel($recurringPayment)); | ||
$payment->execute(new Sync($recurringPayment)); | ||
|
||
$payment->execute($status = new GetHumanStatus($recurringPayment)); | ||
|
||
if ($status->isCanceled()) { | ||
// yes it is cancelled | ||
} else { | ||
// hm... not yet | ||
} | ||
``` | ||
|
||
|
||
Back to [index](index.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters