-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
141b60a
commit fee30bc
Showing
4 changed files
with
63 additions
and
3 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
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,52 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace BeycanPress\CryptoPay\GravityForms\Gateways; | ||
|
||
// @phpcs:disable Generic.Files.InlineHTML | ||
// @phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps | ||
|
||
use BeycanPress\CryptoPay\Payment; | ||
|
||
class Gateway extends AbstractGateway | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
// @phpcs:ignore | ||
public $type = 'cryptopay'; | ||
|
||
/** | ||
* @param array<mixed> $properties | ||
*/ | ||
public function __construct(array $properties = []) | ||
{ | ||
parent::__construct($properties); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function get_form_editor_field_title(): string | ||
{ | ||
return esc_attr__('CryptoPay', 'gf-cryptopay'); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function get_form_editor_field_description(): string | ||
{ | ||
return esc_attr__('Adds cryptocurrency payments to your form.', 'gf-cryptopay'); | ||
} | ||
|
||
/** | ||
* @param int $formId | ||
* @return string | ||
*/ | ||
public function run(int $formId): string | ||
{ | ||
return (new Payment('gravityforms'))->html(); | ||
} | ||
} |
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