OffsiteGateway.php
30 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\Framework\PaymentGateways\Traits; |
| 4 | |
| 5 | trait OffsiteGateway |
| 6 | { |
| 7 | /** |
| 8 | * Return from offsite redirect |
| 9 | * |
| 10 | * @since 2.18.0 |
| 11 | * |
| 12 | * @inheritDoc |
| 13 | */ |
| 14 | abstract public function returnFromOffsiteRedirect($donationId); |
| 15 | |
| 16 | /** |
| 17 | * Generate return url from redirect offsite |
| 18 | * |
| 19 | * @since 2.18.0 |
| 20 | * |
| 21 | * @param int $donationId |
| 22 | * @param array|null $args - associative array of query args |
| 23 | * @return string |
| 24 | */ |
| 25 | public function generateReturnUrlFromRedirectOffsite($donationId, $args = null) |
| 26 | { |
| 27 | return $this->generateGatewayRouteUrl('returnFromOffsiteRedirect', $donationId, $args); |
| 28 | } |
| 29 | } |
| 30 |