Code Analysis: Airwallex Online Payments Gateway 1.3.0

Function Rating Maintainability Complexity Lines of code
Airwallex\AbstractClient::createPaymentIntent()
D
26
32 141
Airwallex\Services\WebhookService::process()
B
31 19 115
Airwallex\Main::addJsLegacy()
B
29
10 174
AirwallexController::paymentConfirmation()
A
35 12 87
Airwallex\Gateways\Main::get_form_fields()
A
37 8 83
AirwallexController::getOrderAndPaymentIntentForConfirmation()
A
46 10 39
AirwallexController::asyncIntent()
A
40 8 62
Airwallex\Gateways\Main::output()
A
42 8 51
Airwallex\Gateways\Main::getPaymentLogos()
A
48 8 33
Airwallex\LoggingClient::getClientPlatform()
A
56 9 16
Airwallex\Main::addGlobalSettings()
A
34 2 116
Airwallex\Gateways\Card::getCardLogos()
A
52 8 23
Airwallex\Client\HttpClient::call()
A
49 7 31
Airwallex\Gateways\WeChat::output()
S
44 6 45
Airwallex\Gateways\Card::get_form_fields()
S
41 5 60
Airwallex\Gateways\Card::output()
S
44 6 45
AirwallexController::dropInPayment()
S
45 6 41
Airwallex\Client\HttpClient::httpSend()
S
46 6 40
Airwallex\Gateways\Main::getPaymentMethods()
S
52 7 23
Airwallex\Main::handleStatusChangeForCard()
S
54 7 21
Airwallex\Gateways\Main::generate_methods_html()
S
42 4 62
Airwallex\Services\OrderService::setPaymentSuccess()
S
49 6 31
Airwallex\AbstractClient::getToken()
S
58 7 16
Airwallex\Services\OrderService::checkPendingTransactions()
S
51 6 26
Airwallex\AbstractClient::doAuth()
S
52 6 26
Airwallex\Gateways\Main::__construct()
S
52 6 22
Airwallex\Main::updateMerchantCountry()
S
54 6 21
Airwallex\Gateways\Blocks\AirwallexCardWCBlockSupport::addPaymentIntent()
S
52 6 21
Airwallex\LoggingClient::log()
S
46 4 41
AirwallexController::cardPayment()
S
47 4 35
AirwallexController::weChatPayment()
S
47 4 35
Airwallex\Services\Util::getLocale()
S
56 5 17
AirwallexController::getRequestHeaders()
S
58 5 15
AirwallexController::jsLog()
S
58 5 15
Airwallex\AbstractClient::createRefund()
S
50 4 30
Airwallex\Struct\AbstractBase::toArray()
S
59 5 14
airwallex_init()
S
51 4 27
Airwallex\Gateways\Card::__construct()
S
59 5 12
Airwallex\Gateways\Main::getStatus()
S
62 5 12
Airwallex\Main::createPages()
S
47 3 39
Airwallex\Gateways\Main::generate_logos_html()
S
44 2 53
Airwallex\Gateways\Main::generate_radio_html()
S
45 2 52
Airwallex\Main::registerEvents()
S
47 3 33
Airwallex\Gateways\Card::capture()
S
56 4 18
Airwallex\Main::registerCron()
S
57 4 18
Airwallex\Gateways\Blocks\AirwallexCardWCBlockSupport::redirectToSeparatePage()
S
65 5 8
Airwallex\Services\WebhookService::getOrderIdForPaymentIntent()
S
61 4 13
Airwallex\Gateways\Main::getActivePaymentLogosArray()
S
59 4 13
Airwallex\AbstractClient::confirmPaymentIntent()
S
52 3 26
Airwallex\Gateways\Card::process_refund()
S
51 3 25
Airwallex\Gateways\Main::process_refund()
S
51 3 25
Airwallex\Gateways\WeChat::process_refund()
S
51 3 25
Airwallex\Services\OrderService::getOrderByPaymentIntentId()
S
54 3 24
Airwallex\AbstractClient::getCustomer()
S
53 3 24
Airwallex\AbstractClient::createCustomer()
S
53 3 24
Airwallex\Services\OrderService::getRefundByAmountAndTime()
S
49 2 38
Airwallex\Gateways\CardSubscriptions::do_subscription_payment()
S
52 3 23
Airwallex\Gateways\Main::do_subscription_payment()
S
52 3 23
Airwallex\Main::wcNoticeApiKeyMissing()
S
55 3 22
AirwallexController::handleStatusForConfirmation()
S
55 3 20
Airwallex\AbstractClient::getPaymentIntent()
S
56 3 18
Airwallex\AbstractClient::createCustomerClientSecret()
S
56 3 18
Airwallex\Main::addDisplayPostStates()
S
62 4 10
Airwallex\Gateways\Blocks\AirwallexCardWCBlockSupport::initialize()
S
65 4 7
Airwallex\Services\OrderService::containsSubscription()
S
77 4 3
Airwallex\Gateways\Card::get_icon()
S
60 3 13
Airwallex\Gateways\WeChat::__construct()
S
60 3 12
Airwallex\Services\OrderService::getAirwallexCustomerId()
S
64 3 11
Airwallex\Struct\AbstractBase::setFromArray()
S
61 3 11
Airwallex\Main::getMerchantCountry()
S
64 3 11
Airwallex\Gateways\Blocks\AirwallexMainWCBlockSupport::getActivePaymentLogos()
S
63 3 11
Airwallex\Services\OrderService::getRefundIdByAirwallexRefundId()
S
56 2 22
Airwallex\AbstractClient::getPaymentMethodTypes()
S
55 2 22
Airwallex\AbstractClient::capture()
S
55 2 21
Airwallex\Main::registerOrderStatus()
S
50 1 35
Airwallex\Gateways\CardSubscriptions::__construct()
S
56 2 19
AirwallexController::webhook()
S
56 2 18
Airwallex\AbstractClient::getAccount()
S
58 2 17
Airwallex\Gateways\Blocks\AirwallexCardWCBlockSupport::get_payment_method_data()
S
56 2 17
Airwallex\Services\OrderService::getOrderByAirwallexRefundId()
S
59 2 15
Airwallex\Main::modifyRequestsForLogging()
S
71 3 5
Airwallex\Main::updateMerchantCountryAfterSave()
S
70 3 6
Airwallex\Services\WebhookService::verifySignature()
S
59 2 15
Airwallex\Gateways\CardSubscriptions::subscription_payment_information()
S
68 3 7
Airwallex\Gateways\Main::get_icon()
S
64 3 9
Airwallex\Main::excludePagesFromMenu()
S
63 3 10
Airwallex\Gateways\Main::subscription_payment_information()
S
68 3 7
Airwallex\Gateways\Blocks\AirwallexCardWCBlockSupport::getCheckoutFormType()
S
67 3 7
Airwallex\Gateways\Blocks\AirwallexMainWCBlockSupport::initialize()
S
70 3 5
Airwallex\Main::addPaymentGateways()
S
64 3 10
Airwallex\Gateways\Blocks\AirwallexWeChatWCBlockSupport::initialize()
S
70 3 5
Airwallex\Gateways\WeChat::get_form_fields()
S
52 1 28
Airwallex\Main::woocommerceBlockSupport()
S
63 2 12
Airwallex\Gateways\Card::process_payment()
S
61 2 12
Airwallex\LoggingClient::getSessionId()
S
72 2 6
Airwallex\Services\CacheService::__construct()
S
77 2 3
Airwallex\Services\CacheService::get()
S
74 2 4
Airwallex\Services\LogService::getInstance()
S
71 2 6
Airwallex\Services\LogService::__construct()
S
69 2 7
Airwallex\Services\LogService::getLoggingClient()
S
69 2 6
Airwallex\Services\OrderService::setAuthorizedStatus()
S
71 2 6
Airwallex\Gateways\Card::get_async_intent_url()
S
70 2 5
Airwallex\AbstractClient::getInstance()
S
71 2 6
Airwallex\Services\OrderService::setTemporaryOrderStateAfterDecline()
S
71 2 6
Airwallex\Services\OrderService::setPendingStatus()
S
71 2 6
Airwallex\AbstractClient::getAuthUrl()
S
78 2 3
Airwallex\Gateways\Card::payment_fields()
S
67 2 8
Airwallex\Services\Util::truncateString()
S
70 2 6
Airwallex\Services\Util::round()
S
70 2 6
Airwallex\AbstractClient::getPciUrl()
S
78 2 3
Airwallex\Struct\AbstractBase::__construct()
S
74 2 5
Airwallex\AbstractClient::getGeneralUrl()
S
78 2 3
Airwallex\Gateways\Main::validate_methods_field()
S
77 2 3
Airwallex\Main::getInstance()
S
71 2 6
Airwallex\AdminClient::getMerchantCountry()
S
68 2 7
Airwallex\AbstractClient::getLogUrl()
S
78 2 3
Airwallex\Gateways\Card::is_captured()
S
64 2 10
Airwallex\AbstractClient::getCacheService()
S
71 2 6
Airwallex\Gateways\CardSubscriptions::mustSaveCard()
S
72 2 6
Airwallex\AbstractClient::savePaymentIntentToCache()
S
67 2 7
Airwallex\AbstractClient::getCachedPaymentIntent()
S
68 2 7
Airwallex\Main::excludePagesFromList()
S
66 2 8
Airwallex\Gateways\Main::validate_logos_field()
S
77 2 3
Airwallex\Gateways\Blocks\AirwallexWCBlockSupport::canDoSubscription()
S
79 2 3
Airwallex\AbstractClient::testAuth()
S
60 1 13
Airwallex\Services\OrderService::getPendingPaymentOrders()
S
64 1 12
Airwallex\Gateways\Blocks\AirwallexMainWCBlockSupport::get_payment_method_data()
S
62 1 12
Airwallex\Gateways\WeChat::process_payment()
S
67 1 8
Airwallex\Struct\Customer::getUpdatedAt()
S
82 1 3
Airwallex\AbstractClient::getAuthorizationRetryClosure()
S
70 1 7
Airwallex\Struct\Refund::getCreatedAt()
S
82 1 3
Airwallex\Struct\PaymentIntent::getOrder()
S
82 1 3
Airwallex\Struct\Refund::setReason()
S
77 1 4
Airwallex\Struct\PaymentIntent::getId()
S
82 1 3
Airwallex\Struct\PaymentIntent::setClientSecret()
S
77 1 4
Airwallex\Struct\Customer::getRequestId()
S
82 1 3
Airwallex\Struct\PaymentIntent::setMetadata()
S
77 1 4
Airwallex\Gateways\Blocks\AirwallexCardWCBlockSupport::get_payment_method_script_handles()
S
77 1 4
Airwallex\Main::addPluginSettingsLink()
S
71 1 5
Airwallex\Struct\PaymentIntent::setCustomerId()
S
77 1 4
Airwallex\Struct\PaymentIntent::getDescriptor()
S
82 1 3
Airwallex\Struct\PaymentIntent::setId()
S
77 1 4
Airwallex\Struct\PaymentIntent::setCreatedAt()
S
77 1 4
Airwallex\Struct\PaymentIntent::getSupplementaryAmount()
S
82 1 3
Airwallex\Services\LogService::debug()
S
74 1 4
Airwallex\Gateways\Blocks\AirwallexWCBlockSupport::is_active()
S
80 1 3
Airwallex\Struct\Customer::getFirstName()
S
82 1 3
Airwallex\Services\LogService::getLogFile()
S
76 1 3
Airwallex\Struct\PaymentIntent::getPaymentConsentId()
S
82 1 3
Airwallex\Struct\PaymentIntent::setUpdatedAt()
S
77 1 4
Airwallex\Services\CacheService::set()
S
78 1 3
Airwallex\Struct\PaymentIntent::setReturnUrl()
S
77 1 4
Airwallex\Struct\Customer::setRequestId()
S
77 1 4
Airwallex\Struct\PaymentIntent::getReturnUrl()
S
82 1 3
Airwallex\Gateways\Blocks\AirwallexWCBlockSupport::get_supported_features()
S
82 1 3
Airwallex\Struct\Customer::setFirstName()
S
77 1 4
Airwallex\Struct\PaymentIntent::setDescriptor()
S
77 1 4
Airwallex\Main::checkPendingTransactions()
S
81 1 3
Airwallex\Struct\PaymentIntent::getLatestPaymentAttempt()
S
82 1 3
Airwallex\Struct\Refund::setCurrency()
S
77 1 4
Airwallex\AbstractClient::getHttpClient()
S
80 1 3
Airwallex\Services\LogService::error()
S
71 1 5
Airwallex\Struct\Refund::setStatus()
S
77 1 4
Airwallex\Gateways\Blocks\AirwallexWCBlockSupport::get_payment_method_script_handles_for_admin()
S
66 1 10
Airwallex\Struct\Refund::setCreatedAt()
S
77 1 4
Airwallex\Main::handleStatusChange()
S
80 1 3
Airwallex\Struct\Refund::setPaymentAttemptId()
S
77 1 4
Airwallex\Struct\PaymentIntent::getAmount()
S
82 1 3
Airwallex\Struct\Customer::setEmail()
S
77 1 4
Airwallex\Struct\PaymentIntent::setSupplementaryAmount()
S
77 1 4
Airwallex\AbstractClient::getReferrer()
S
68 1 8
Airwallex\Struct\Refund::getId()
S
82 1 3
Airwallex\Struct\PaymentIntent::setCapturedAmount()
S
77 1 4
Airwallex\Struct\Customer::getMerchantCustomerId()
S
82 1 3
Airwallex\Struct\Customer::getEmail()
S
82 1 3
Airwallex\Struct\Customer::getLastName()
S
82 1 3
Airwallex\Main::getInstanceKey()
S
80 1 3
Airwallex\Struct\Refund::getStatus()
S
82 1 3
Airwallex\Gateways\Blocks\AirwallexCardWCBlockSupport::enqueue_style()
S
69 1 8
Airwallex\AdminClient::__construct()
S
74 1 5
Airwallex\Struct\Customer::setUpdatedAt()
S
77 1 4
Airwallex\Struct\PaymentIntent::setRequestId()
S
77 1 4
Airwallex\WeChatClient::__construct()
S
67 1 7
Airwallex\Struct\PaymentIntent::getMetadata()
S
82 1 3
Airwallex\Struct\Customer::setCreatedAt()
S
77 1 4
Airwallex\Gateways\Main::generate_free_html()
S
68 1 9
Airwallex\Struct\Refund::setAmount()
S
77 1 4
Airwallex\CardClient::__construct()
S
67 1 7
Airwallex\LoggingClient::__construct()
S
71 1 6
Airwallex\Struct\PaymentIntent::setStatus()
S
77 1 4
Airwallex\Gateways\Blocks\AirwallexWeChatWCBlockSupport::get_payment_method_data()
S
64 1 10
Airwallex\Struct\Customer::getId()
S
82 1 3
Airwallex\Struct\PaymentIntent::getUpdatedAt()
S
82 1 3
Airwallex\Struct\PaymentIntent::getRequestId()
S
82 1 3
Airwallex\MainClient::__construct()
S
67 1 7
Airwallex\Services\LogService::warning()
S
71 1 5
Airwallex\Struct\Refund::getMetaKey()
S
80 1 3
Airwallex\Struct\PaymentIntent::getCurrency()
S
82 1 3
Airwallex\Main::init()
S
73 1 6
Airwallex\Struct\PaymentIntent::getMerchantOrderId()
S
82 1 3
Airwallex\Struct\Customer::setLastName()
S
77 1 4
Airwallex\LoggingClient::isActive()
S
77 1 3
Airwallex\Struct\PaymentIntent::getCustomerId()
S
82 1 3
Airwallex\Struct\PaymentIntent::setAmount()
S
77 1 4
Airwallex\Struct\Customer::setId()
S
77 1 4
Airwallex\Struct\Refund::getUpdatedAt()
S
82 1 3
Airwallex\Struct\Refund::getRequestId()
S
82 1 3
Airwallex\Struct\PaymentIntent::getClientSecret()
S
82 1 3
Airwallex\Struct\Refund::getPaymentIntentId()
S
82 1 3
Airwallex\Struct\Customer::setMerchantCustomerId()
S
77 1 4
Airwallex\Struct\Refund::getAmount()
S
82 1 3
Airwallex\Struct\Refund::setUpdatedAt()
S
77 1 4
Airwallex\Struct\Refund::setPaymentIntentId()
S
77 1 4
Airwallex\Main::isJsLoggingActive()
S
77 1 3
AirwallexController::setTemporaryOrderStateAfterDecline()
S
81 1 3
Airwallex\Struct\Refund::setRequestId()
S
77 1 4
Airwallex\Struct\PaymentIntent::setCurrency()
S
77 1 4
Airwallex\Struct\Customer::getCreatedAt()
S
82 1 3
AirwallexController::__construct()
S
80 1 3
Airwallex\Struct\Refund::getPaymentAttemptId()
S
82 1 3
Airwallex\Struct\Refund::setId()
S
77 1 4
Airwallex\Struct\PaymentIntent::setOrder()
S
77 1 4
Airwallex\Struct\PaymentIntent::setMerchantOrderId()
S
77 1 4
Airwallex\Struct\PaymentIntent::getStatus()
S
82 1 3
Airwallex\Struct\PaymentIntent::setPaymentConsentId()
S
77 1 4
Airwallex\Struct\Refund::getReason()
S
82 1 3
Airwallex\Services\LogService::log()
S
76 1 3
Airwallex\Struct\Refund::getCurrency()
S
82 1 3
Airwallex\Struct\PaymentIntent::setLatestPaymentAttempt()
S
77 1 4
Airwallex\Gateways\Main::process_payment()
S
67 1 8
Airwallex\Gateways\Card::is_capture_immediately()
S
78 1 3
Airwallex\Struct\PaymentIntent::getCreatedAt()
S
82 1 3
Airwallex\Struct\PaymentIntent::getCapturedAmount()
S
82 1 3
Airwallex\Gateways\Blocks\AirwallexWCBlockSupport::get_payment_method_script_handles()
S
66 1 10