Skip to content

Commit

Permalink
More PHPDocs work
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed Apr 30, 2024
1 parent e554c9e commit 842d1ba
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 62 deletions.
8 changes: 4 additions & 4 deletions upload/admin/controller/extension/payment/paypal.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,12 @@ public function auth(): void {

$data['configure_url'] = [
'production' => [
'ppcp' => 'https: //www.paypal.com/bizsignup/partner/entry?partnerId = ' . $data['setting']['partner']['production']['partner_id'] . '&partnerClientId = ' . $data['setting']['partner']['production']['client_id'] . '&features = PAYMENT,REFUND,ACCESS_MERCHANT_INFORMATION,VAULT,BILLING_AGREEMENT&product = PPCP,ADVANCED_VAULTING&capabilities = PAYPAL_WALLET_VAULTING_ADVANCED&integrationType = FO&returnToPartnerUrl = ' . $data['partner_url'] . '&displayMode = minibrowser&sellerNonce = ' . $data['seller_nonce'],
'express_checkout' => 'https: //www.paypal.com/bizsignup/partner/entry?partnerId = ' . $data['setting']['partner']['production']['partner_id'] . '&partnerClientId = ' . $data['setting']['partner']['production']['client_id'] . '&features = PAYMENT,REFUND,ACCESS_MERCHANT_INFORMATION,VAULT,BILLING_AGREEMENT&product = EXPRESS_CHECKOUT,ADVANCED_VAULTING&capabilities = PAYPAL_WALLET_VAULTING_ADVANCED&integrationType = FO&returnToPartnerUrl = ' . $data['partner_url'] . '&displayMode = minibrowser&sellerNonce = ' . $data['seller_nonce']
'ppcp' => 'https://www.paypal.com/bizsignup/partner/entry?partnerId=' . $data['setting']['partner']['production']['partner_id'] . '&partnerClientId=' . $data['setting']['partner']['production']['client_id'] . '&features=PAYMENT,REFUND,ACCESS_MERCHANT_INFORMATION,VAULT,BILLING_AGREEMENT&product=PPCP,ADVANCED_VAULTING&capabilities=PAYPAL_WALLET_VAULTING_ADVANCED&integrationType=FO&returnToPartnerUrl=' . $data['partner_url'] . '&displayMode=minibrowser&sellerNonce=' . $data['seller_nonce'],
'express_checkout' => 'https://www.paypal.com/bizsignup/partner/entry?partnerId=' . $data['setting']['partner']['production']['partner_id'] . '&partnerClientId=' . $data['setting']['partner']['production']['client_id'] . '&features=PAYMENT,REFUND,ACCESS_MERCHANT_INFORMATION,VAULT,BILLING_AGREEMENT&product=EXPRESS_CHECKOUT,ADVANCED_VAULTING&capabilities=PAYPAL_WALLET_VAULTING_ADVANCED&integrationType=FO&returnToPartnerUrl=' . $data['partner_url'] . '&displayMode=minibrowser&sellerNonce=' . $data['seller_nonce']
],
'sandbox' => [
'ppcp' => 'https: //www.sandbox.paypal.com/bizsignup/partner/entry?partnerId = ' . $data['setting']['partner']['sandbox']['partner_id'] . '&partnerClientId = ' . $data['setting']['partner']['sandbox']['client_id'] . '&features = PAYMENT,REFUND,ACCESS_MERCHANT_INFORMATION,VAULT,BILLING_AGREEMENT&product = PPCP,ADVANCED_VAULTING&capabilities = PAYPAL_WALLET_VAULTING_ADVANCED&integrationType = FO&returnToPartnerUrl = ' . $data['partner_url'] . '&displayMode = minibrowser&sellerNonce = ' . $data['seller_nonce'],
'express_checkout' => 'https: //www.sandbox.paypal.com/bizsignup/partner/entry?partnerId = ' . $data['setting']['partner']['sandbox']['partner_id'] . '&partnerClientId = ' . $data['setting']['partner']['sandbox']['client_id'] . '&features = PAYMENT,REFUND,ACCESS_MERCHANT_INFORMATION,VAULT,BILLING_AGREEMENT&product = EXPRESS_CHECKOUT,ADVANCED_VAULTING&capabilities = PAYPAL_WALLET_VAULTING_ADVANCED&integrationType = FO&returnToPartnerUrl = ' . $data['partner_url'] . '&displayMode = minibrowser&sellerNonce = ' . $data['seller_nonce']
'ppcp' => 'https://www.sandbox.paypal.com/bizsignup/partner/entry?partnerId=' . $data['setting']['partner']['sandbox']['partner_id'] . '&partnerClientId=' . $data['setting']['partner']['sandbox']['client_id'] . '&features=PAYMENT,REFUND,ACCESS_MERCHANT_INFORMATION,VAULT,BILLING_AGREEMENT&product=PPCP,ADVANCED_VAULTING&capabilities=PAYPAL_WALLET_VAULTING_ADVANCED&integrationType=FO&returnToPartnerUrl=' . $data['partner_url'] . '&displayMode=minibrowser&sellerNonce=' . $data['seller_nonce'],
'express_checkout' => 'https://www.sandbox.paypal.com/bizsignup/partner/entry?partnerId=' . $data['setting']['partner']['sandbox']['partner_id'] . '&partnerClientId=' . $data['setting']['partner']['sandbox']['client_id'] . '&features=PAYMENT,REFUND,ACCESS_MERCHANT_INFORMATION,VAULT,BILLING_AGREEMENT&product=EXPRESS_CHECKOUT,ADVANCED_VAULTING&capabilities=PAYPAL_WALLET_VAULTING_ADVANCED&integrationType=FO&returnToPartnerUrl=' . $data['partner_url'] . '&displayMode=minibrowser&sellerNonce=' . $data['seller_nonce']
]
];

Expand Down
70 changes: 35 additions & 35 deletions upload/admin/model/extension/advertise/google.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class ModelExtensionAdvertiseGoogle extends Model {
];

/**
* isAppIdUsed
* Is App Id Used
*
* @param string $app_id
* @param int $store_id
Expand All @@ -145,7 +145,7 @@ public function isAppIdUsed(string $app_id, int $store_id): bool {
}

/**
* getFinalProductId
* Get Final Product Id
*
* @return int
*/
Expand All @@ -160,7 +160,7 @@ public function getFinalProductId(): int {
}

/**
* isAnyProductCategoryModified
* Is Any Product Category Modified
*
* @param int $store_id
*
Expand All @@ -173,7 +173,7 @@ public function isAnyProductCategoryModified(int $store_id): int {
}

/**
* getAdvertisedCount
* Get Advertised Count
*
* @param int $store_id
*
Expand All @@ -186,7 +186,7 @@ public function getAdvertisedCount(int $store_id): int {
}

/**
* getMapping
* Get Mapping
*
* @param int $store_id
*
Expand All @@ -199,7 +199,7 @@ public function getMapping(int $store_id): int {
}

/**
* setCategoryMapping
* Set Category Mapping
*
* @param string $google_product_category
* @param int $store_id
Expand All @@ -212,7 +212,7 @@ public function setCategoryMapping(string $google_product_category, int $store_i
}

/**
* getMappedCategory
* Get Mapped Category
*
* @param string $google_product_category
* @param int $store_id
Expand All @@ -226,7 +226,7 @@ public function getMappedCategory(string $google_product_category, int $store_id
}

/**
* getProductByProductAdvertiseGoogleId
* Get Product By Product Advertise Google Id
*
* @param int $product_advertise_google_id
*
Expand All @@ -248,7 +248,7 @@ public function getProductByProductAdvertiseGoogleId(int $product_advertise_goog
}

/**
* getProductAdvertiseGoogle
* Get Product Advertise Google
*
* @param int $product_advertise_google_id
*
Expand All @@ -261,7 +261,7 @@ public function getProductAdvertiseGoogle(int $product_advertise_google_id): arr
}

/**
* hasActiveTarget
* Has Active Target
*
* @param int $store_id
*
Expand All @@ -274,7 +274,7 @@ public function hasActiveTarget(int $store_id): int {
}

/**
* getRequiredFieldsByProductIds
* Get Required Fields By Product Ids
*
* @param array<string, mixed> $product_ids
* @param int $store_id
Expand All @@ -300,7 +300,7 @@ public function getRequiredFieldsByProductIds(array $product_ids, int $store_id)
}

/**
* getRequiredFieldsByFilter
* Get Required Fields By Filter
*
* @param array<string, mixed> $data
* @param int $store_id
Expand All @@ -326,7 +326,7 @@ public function getRequiredFieldsByFilter(array $data, int $store_id): array {
}

/**
* getTargetCountriesByProductIds
* Get Target Countries By Product Ids
*
* @param array<string, mixed> $product_ids
* @param int $store_id
Expand All @@ -340,7 +340,7 @@ public function getTargetCountriesByProductIds(array $product_ids, int $store_id
}

/**
* getTargetCountriesByFilter
* Get Target Countries By Filter
*
* @param array<string, mixed> $data
* @param int $store_id
Expand All @@ -356,7 +356,7 @@ public function getTargetCountriesByFilter(array $data, int $store_id): array {
}

/**
* getProductOptionsByProductIds
* Get Product Options By Product Ids
*
* @param array<string, mixed> $product_ids
*
Expand All @@ -369,7 +369,7 @@ public function getProductOptionsByProductIds(array $product_ids): array {
}

/**
* getProductOptionsByFilter
* Get Product Options By Filter
*
* @param array<string, mixed> $data
*
Expand All @@ -384,7 +384,7 @@ public function getProductOptionsByFilter(array $data): array {
}

/**
* addTarget
* Add Target
*
* @param array<string, mixed> $target
* @param int $store_id
Expand All @@ -398,7 +398,7 @@ public function addTarget(array $target, int $store_id): int {
}

/**
* deleteProducts
* Delete Products
*
* @param array<string, mixed> $product_ids
*
Expand All @@ -411,7 +411,7 @@ public function deleteProducts(array $product_ids): void {
}

/**
* setAdvertisingBySelect
* Set Advertising By Select
*
* @param array<string, mixed> $post_product_ids
* @param array<string, mixed> $post_target_ids
Expand Down Expand Up @@ -444,7 +444,7 @@ public function setAdvertisingBySelect(array $post_product_ids, array $post_targ
}

/**
* setAdvertisingByFilter
* Set Advertising By Filter
*
* @param array<string, mixed> $data
* @param array<string, mixed> $post_target_ids
Expand Down Expand Up @@ -473,7 +473,7 @@ public function setAdvertisingByFilter(array $data, array $post_target_ids, int
}

/**
* insertNewProducts
* Insert New Products
*
* @param array<string, mixed> $product_ids
* @param int $store_id
Expand All @@ -491,7 +491,7 @@ public function insertNewProducts(array $product_ids, int $store_id): void {
}

/**
* updateGoogleProductCategoryMapping
* Update Google Product Category Mapping
*
* @param int $store_id
*
Expand All @@ -502,7 +502,7 @@ public function updateGoogleProductCategoryMapping(int $store_id): void {
}

/**
* updateSingleProductFields
* Update Single Product Fields
*
* @param array<string, mixed> $data
*
Expand All @@ -521,7 +521,7 @@ public function updateSingleProductFields(array $data): void {
}

/**
* updateMultipleProductFields
* Update Multiple Product Fields
*
* @param array<string, mixed> $filter_data
* @param array<string, mixed> $data
Expand Down Expand Up @@ -633,7 +633,7 @@ public function getCategories(array $data, int $store_id): array {
}

/**
* getProductCampaigns
* Get Product Campaigns
*
* @param int $product_id
* @param int $store_id
Expand All @@ -647,7 +647,7 @@ public function getProductCampaigns(int $product_id, int $store_id): array {
}

/**
* getProductIssues
* Get Product Issues
*
* @param int $product_id
* @param int $store_id
Expand Down Expand Up @@ -710,7 +710,7 @@ public function getProductIssues(int $product_id, int $store_id): array {
}

/**
* renameTables
* Rename Tables
*
* @return void
*
Expand All @@ -731,7 +731,7 @@ public function renameTables(): void {
}

/**
* tableExists
* Table Exists
*
* @param string $table
*
Expand All @@ -742,7 +742,7 @@ private function tableExists($table): int {
}

/**
* tableColunsMatch
* Table Columns Match
*
* @param string $table
* @param string $columns
Expand Down Expand Up @@ -774,7 +774,7 @@ private function wrap($text, $char) {
}

/**
* createTables
* Create Tables
*
* @return void
*/
Expand Down Expand Up @@ -848,7 +848,7 @@ public function createTables(): void {
}

/**
* fixColumns
* Fix Columns
*
* @return void
*/
Expand Down Expand Up @@ -887,7 +887,7 @@ public function fixColumns(): void {
}

/**
* dropTables
* Drop Tables
*
* @return void
*/
Expand All @@ -900,7 +900,7 @@ public function dropTables(): void {
}

/**
* deleteEvents
* Delete Events
*
* @return void
*/
Expand All @@ -912,7 +912,7 @@ public function deleteEvents(): void {
}

/**
* createEvents
* Create Events
*
* @return void
*/
Expand All @@ -928,7 +928,7 @@ public function createEvents(): void {
}

/**
* getAllowedTargets
* Get Allowed Targets
*
* @return array<int, array<string, mixed>>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ $('#tab-paypal').on('click', '.button-capture-payment', function() {
});
});
$('#tab-paypal').on('click', '.button-reauthorize-payment', function() {
$.ajax({
type: 'post',
Expand Down Expand Up @@ -83,7 +82,6 @@ $('#tab-paypal').on('click', '.button-reauthorize-payment', function() {
});
});
$('#tab-paypal').on('click', '.button-void-payment', function() {
$.ajax({
type: 'post',
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/controller/extension/payment/paypal.php
Original file line number Diff line number Diff line change
Expand Up @@ -3203,7 +3203,7 @@ public function header_before(string &$route, array &$data): void {

if (($route == 'product/product') && !empty($this->request->get['product_id']) && ($setting['button']['product']['status'] || $setting['message']['product']['status'])) {
$params['page_code'] = 'product';
$params['product_id'] = $this->request->get['product_id'];
$params['product_id'] = (int)$this->request->get['product_id'];
}

if (($route == 'checkout/cart') && ($setting['button']['cart']['status'] || $setting['message']['cart']['status'])) {
Expand Down
Loading

0 comments on commit 842d1ba

Please sign in to comment.