Skip to content

Commit

Permalink
Add card.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Feb 16, 2024
1 parent c4c1eed commit bf90b40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ function () {
// Billie.
$this->register_payment_method( new PaymentMethod( PaymentMethods::BILLIE ) );

// Card..
$payment_method_card = new PaymentMethod( PaymentMethods::CARD );

Check failure on line 158 in src/Gateway.php

View workflow job for this annotation

GitHub Actions / phpstan / phpstan

Access to undefined constant Pronamic\WordPress\Pay\Core\PaymentMethods::CARD.
$payment_method_card->add_support( 'recurring' );
$payment_method_card->add_field( $field_mollie_card );

$this->register_payment_method( $payment_method_card );

// Payment method credit card.
$payment_method_credit_card = new PaymentMethod( PaymentMethods::CREDIT_CARD );
$payment_method_credit_card->add_support( 'recurring' );
Expand Down
1 change: 1 addition & 0 deletions src/MethodTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class MethodTransformer {
PronamicMethod::BANCONTACT => MollieMethod::BANCONTACT,
PronamicMethod::BANK_TRANSFER => MollieMethod::BANKTRANSFER,
PronamicMethod::BILLIE => MollieMethod::BILLIE,
PronamicMethod::CARD => MollieMethod::CREDITCARD,

Check failure on line 30 in src/MethodTransformer.php

View workflow job for this annotation

GitHub Actions / phpstan / phpstan

Access to undefined constant Pronamic\WordPress\Pay\Core\PaymentMethods::CARD.
PronamicMethod::CREDIT_CARD => MollieMethod::CREDITCARD,
PronamicMethod::DIRECT_DEBIT => MollieMethod::DIRECT_DEBIT,
PronamicMethod::DIRECT_DEBIT_BANCONTACT => MollieMethod::DIRECT_DEBIT,
Expand Down

0 comments on commit bf90b40

Please sign in to comment.