public function StoredOffsiteRedirect::buildAvsResponseCodeLabel in Commerce Core 8.2
Builds a label for the given AVS response code and card type.
Parameters
string $avs_response_code: The AVS response code.
string $card_type: The card type.
Return value
string|null The label, or NULL if not available.
Overrides PaymentGatewayBase::buildAvsResponseCodeLabel
1 call to StoredOffsiteRedirect::buildAvsResponseCodeLabel()
- StoredOffsiteRedirect::onReturn in modules/
payment_example/ src/ Plugin/ Commerce/ PaymentGateway/ StoredOffsiteRedirect.php - Processes the "return" request.
File
- modules/
payment_example/ src/ Plugin/ Commerce/ PaymentGateway/ StoredOffsiteRedirect.php, line 174
Class
- StoredOffsiteRedirect
- Provides an example offsite payment gateway with stored payment methods.
Namespace
Drupal\commerce_payment_example\Plugin\Commerce\PaymentGatewayCode
public function buildAvsResponseCodeLabel($avs_response_code, $card_type) {
if ($card_type == 'dinersclub' || $card_type == 'jcb') {
if ($avs_response_code == 'Z') {
return $this
->t('Zip code.');
}
return NULL;
}
return parent::buildAvsResponseCodeLabel($avs_response_code, $card_type);
}