| 1 |
<?php |
| 2 |
|
| 3 |
namespace IvyForms\Services\Payment; |
| 4 |
|
| 5 |
use IvyForms\Entity\Form\Form; |
| 6 |
|
| 7 |
/** |
| 8 |
* Payment provider used during public form submission (Square, Stripe, …). |
| 9 |
*/ |
| 10 |
interface PaymentGatewayInterface |
| 11 |
{ |
| 12 |
public function getId(): string; |
| 13 |
|
| 14 |
/** |
| 15 |
* Charge (or begin SCA) after form validation. Must not create the IvyForms entry. |
| 16 |
* |
| 17 |
* @param array<string, mixed> $rawParams |
| 18 |
* @param array<int, object> $formFields |
| 19 |
* @param array<string, mixed> $submissionData |
| 20 |
* @param object $paymentField |
| 21 |
*/ |
| 22 |
public function processCharge( |
| 23 |
array $rawParams, |
| 24 |
Form $form, |
| 25 |
array $formFields, |
| 26 |
array $submissionData, |
| 27 |
object $paymentField, |
| 28 |
float $total |
| 29 |
): PaymentChargeResult; |
| 30 |
} |
| 31 |
|