Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

little cleanup in comments and names #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions includes/abstracts/abstract-wc-heidelpay-payment-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public function checkoutValidation()
}

/**
* Check whether this paymethod was selected based on
* Check whether this payment method was selected based on
* @return bool
*/
public function isGatewayActive()
Expand Down Expand Up @@ -234,7 +234,7 @@ public function process_payment($order_id)
}

/**
* @param $order WC_Order
* @param WC_Order $order
* @throws Exception
*/
public function prepareRequest(WC_Order $order)
Expand Down Expand Up @@ -279,7 +279,7 @@ protected function setAsync()
{
$this->payMethod->getRequest()->async(
$this->getLanguage(), // Language code for the Frame
$this->getResponeUrl()
$this->getResponseUrl()
);
}

Expand Down Expand Up @@ -537,7 +537,7 @@ public function callback_handler()
$this->addPaymentError($this->getErrorMessage());
wc_get_logger()->log(WC_Log_Levels::DEBUG,
'heidelpay - Response: There has been an error fetching the RedirectURL by the payment. '
. 'Please make sure the ResponseURL (' . $this->getResponeUrl() .')is accessible from the internet.',
. 'Please make sure the ResponseURL (' . $this->getResponseUrl() .')is accessible from the internet.',
array('source' => 'heidelpay'));
wp_redirect(wc_get_cart_url());
}
Expand Down Expand Up @@ -648,7 +648,7 @@ protected function getBookingSelection()
/**
* @return string
*/
protected function getResponeUrl()
protected function getResponseUrl()
{
return get_home_url() . '/wc-api/' . strtolower(get_class($this));
}
Expand Down
6 changes: 3 additions & 3 deletions includes/gateways/class-wc-heidelpay-gateway-cc.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public function init_form_fields()
$this->initFormFieldsAddon();
}

/**
* sets the Payment Method.
*/
/**
* set the id and payment method
*/
public function setPayMethod()
{
/** @var \Heidelpay\PhpPaymentApi\PaymentMethods\CreditCardPaymentMethod payMethod */
Expand Down
6 changes: 3 additions & 3 deletions includes/gateways/class-wc-heidelpay-gateway-dc.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public function init_form_fields()
$this->initFormFieldsAddon();
}

/**
* sets the Payment Method.
*/
/**
* set the id and payment method
*/
public function setPayMethod()
{
$this->payMethod = new DebitCardPaymentMethod();
Expand Down
14 changes: 7 additions & 7 deletions includes/gateways/class-wc-heidelpay-gateway-dd.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ public function payment_fields()

//payment form

/**
* Set the id and PaymenMethod
*/
/**
* set the id and payment method
*/
protected function setPayMethod()
{
$this->payMethod = new DirectDebitPaymentMethod();
Expand All @@ -130,10 +130,10 @@ protected function setPayMethod()
$this->name = __('Direct Debit', 'woocommerce-heidelpay');
}

/**
* @return false Returns false if the handling failed
*/
protected function handleFormPost()
/**
* no return value
*/
protected function handleFormPost()
{
parent::handleFormPost();

Expand Down
3 changes: 3 additions & 0 deletions includes/gateways/class-wc-heidelpay-gateway-gp.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class WC_Gateway_HP_GP extends WC_Heidelpay_Payment_Gateway
/** @var array Array of locales */
public $locale;

/**
* set the id and payment method
*/
public function setPayMethod()
{
$this->payMethod = new GiropayPaymentMethod();
Expand Down
7 changes: 5 additions & 2 deletions includes/gateways/class-wc-heidelpay-gateway-idl.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class WC_Gateway_HP_IDL extends WC_Heidelpay_Payment_Gateway
/** @var array Array of locales */
public $locale;

/**
* set the id and payment method
*/
public function setPayMethod()
{
$this->payMethod = new IDealPaymentMethod();
Expand Down Expand Up @@ -60,7 +63,7 @@ public function payment_fields()
$accountHolderLabel = __('Account Holder', 'woocommerce-heidelpay');
$bankNameLabel = __('Bank', 'woocommerce-heidelpay');

// Performe Authorize request to get paymethod config
// perform authorize request to get payment method config
$this->setAuthentification();
$this->setAsync();
$this->setCriterions();
Expand Down Expand Up @@ -130,7 +133,7 @@ public function setAvailability($available_gateways)
}

/**
* @return false Returns false if the handling failed
* no return
*/
protected function handleFormPost()
{
Expand Down
2 changes: 1 addition & 1 deletion includes/gateways/class-wc-heidelpay-gateway-iv.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function init_form_fields()
}

/**
* Set the id and PaymentMethod
* set the id and payment method
*/
protected function setPayMethod()
{
Expand Down
2 changes: 1 addition & 1 deletion includes/gateways/class-wc-heidelpay-gateway-ivpg.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public function ErrorHtml()
}

/**
* Set the id and PaymenMethod
* set the id and payment method
*/
protected function setPayMethod()
{
Expand Down
4 changes: 2 additions & 2 deletions includes/gateways/class-wc-heidelpay-gateway-pp.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Prepayment
*
* WooCommerce payment gateway for Secured Invoice
* WooCommerce payment gateway for Prepayment
*
* @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
* @copyright Copyright © 2018-present heidelpay GmbH. All rights reserved.
Expand Down Expand Up @@ -73,7 +73,7 @@ public function init_form_fields()


/**
* Set the id and PaymenMethod
* set the id and payment method
*/
protected function setPayMethod()
{
Expand Down
3 changes: 3 additions & 0 deletions includes/gateways/class-wc-heidelpay-gateway-so.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class WC_Gateway_HP_SO extends WC_Heidelpay_Payment_Gateway
/** @var array Array of locales */
public $locale;

/**
* set the id and payment method
*/
public function setPayMethod()
{
$this->payMethod = new SofortPaymentMethod();
Expand Down
2 changes: 1 addition & 1 deletion includes/gateways/class-wc-heidelpay-gateway-va.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct()
}

/**
* sets the Payment Method.
* set the id and payment method
*/
public function setPayMethod()
{
Expand Down