17
17
18
18
/**
19
19
* Wrapper that performs Paypal Express and Checkout communication
20
- * Use current Paypal Express method instance
20
+ *
21
21
* @SuppressWarnings(PHPMD.TooManyFields)
22
22
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
23
23
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -26,6 +26,7 @@ class Checkout
26
26
{
27
27
/**
28
28
* Cache ID prefix for "pal" lookup
29
+ *
29
30
* @var string
30
31
*/
31
32
const PAL_CACHE_ID = 'paypal_express_checkout_pal ' ;
@@ -367,6 +368,7 @@ public function __construct(
367
368
368
369
/**
369
370
* Checkout with PayPal image URL getter
371
+ *
370
372
* Spares API calls of getting "pal" variable, by putting it into cache per store view
371
373
*
372
374
* @return string
@@ -599,8 +601,8 @@ public function canSkipOrderReviewStep()
599
601
600
602
/**
601
603
* Update quote when returned from PayPal
602
- * rewrite billing address by paypal
603
- * save old billing address for new customer
604
+ *
605
+ * Rewrite billing address by paypal, save old billing address for new customer, and
604
606
* export shipping address in case address absence
605
607
*
606
608
* @param string $token
@@ -946,6 +948,8 @@ protected function _setBillingAgreementRequest()
946
948
}
947
949
948
950
/**
951
+ * Get api
952
+ *
949
953
* @return \Magento\Paypal\Model\Api\Nvp
950
954
*/
951
955
protected function _getApi ()
@@ -958,8 +962,9 @@ protected function _getApi()
958
962
959
963
/**
960
964
* Attempt to collect address shipping rates and return them for further usage in instant update API
961
- * Returns empty array if it was impossible to obtain any shipping rate
962
- * If there are shipping rates obtained, the method must return one of them as default.
965
+ *
966
+ * Returns empty array if it was impossible to obtain any shipping rate and
967
+ * if there are shipping rates obtained, the method must return one of them as default.
963
968
*
964
969
* @param Address $address
965
970
* @param bool $mayReturnEmpty
@@ -1043,8 +1048,8 @@ protected function _prepareShippingOptions(Address $address, $mayReturnEmpty = f
1043
1048
* Compare two shipping options based on their amounts
1044
1049
*
1045
1050
* This function is used as a callback comparison function in shipping options sorting process
1046
- * @see self::_prepareShippingOptions()
1047
1051
*
1052
+ * @see self::_prepareShippingOptions()
1048
1053
* @param \Magento\Framework\DataObject $option1
1049
1054
* @param \Magento\Framework\DataObject $option2
1050
1055
* @return int
@@ -1059,6 +1064,7 @@ protected static function cmpShippingOptions(DataObject $option1, DataObject $op
1059
1064
1060
1065
/**
1061
1066
* Try to find whether the code provided by PayPal corresponds to any of possible shipping rates
1067
+ *
1062
1068
* This method was created only because PayPal has issues with returning the selected code.
1063
1069
* If in future the issue is fixed, we don't need to attempt to match it. It would be enough to set the method code
1064
1070
* before collecting shipping rates
@@ -1084,6 +1090,7 @@ protected function _matchShippingMethodCode(Address $address, $selectedCode)
1084
1090
1085
1091
/**
1086
1092
* Create payment redirect url
1093
+ *
1087
1094
* @param bool|null $button
1088
1095
* @param string $token
1089
1096
* @return void
@@ -1107,6 +1114,7 @@ public function getCustomerSession()
1107
1114
1108
1115
/**
1109
1116
* Set shipping options to api
1117
+ *
1110
1118
* @param \Magento\Paypal\Model\Cart $cart
1111
1119
* @param \Magento\Quote\Model\Quote\Address|null $address
1112
1120
* @return void
0 commit comments