Skip to content
GitLab
Erkunden
Anmelden
Registrieren
Primärnavigation
Suchen oder aufrufen …
Projekt
payment-stripe
Verwalten
Aktivität
Mitglieder
Labels
Planen
Tickets
9
Ticketübersichten
Meilensteine
Wiki
Code
Merge Requests
1
Repository
Branch
Commits
Tags
Repository-Diagramm
Revisionen vergleichen
Code-Schnipsel
Build
Pipelines
Aufgaben
Pipeline-Zeitpläne
Artefakte
Bereitstellung
Releases
Betreiben
Umgebungen
Überwachen
Vorfälle
Service-Desk
Analysieren
Wertschöpfungskettenanalyse
Mitwirkenden-Analyse
CI/CD-Analyse
Repository-Analysen
Hilfe
Hilfe
Support
GitLab-Dokumentation
GitLab-Pläne vergleichen
Community-Forum
Zu GitLab beitragen
Feedback geben
Tastenkürzel
?
Code-Schnipsel
Gruppen
Projekte
Show more breadcrumbs
QUIQQER
payment-stripe
Commits
513be377
Commit
513be377
erstellt
vor 4 Jahren
von
Patrick Müller
Dateien durchsuchen
Optionen
Downloads
Patches
Einfaches Diff
fix: billing plan pagination
Übergeordneter
7c8b0420
No related branches found
Branches enthält Commit
No related tags found
Tags enthält Commit
Keine zugehörigen Merge Requests gefunden
Änderungen
2
Leerzeichenänderungen ausblenden
Inline
Nebeneinander
2 geänderte Dateien
ajax/backend/settings/getBillingPlans.php
+10
-7
10 Ergänzungen, 7 Löschungen
ajax/backend/settings/getBillingPlans.php
src/QUI/ERP/Payments/Stripe/PaymentMethods/Recurring/BillingPlans.php
+5
-12
5 Ergänzungen, 12 Löschungen
...Payments/Stripe/PaymentMethods/Recurring/BillingPlans.php
werden angezeigt
mit
15 Ergänzungen
und
19 Löschungen
ajax/backend/settings/getBillingPlans.php
+
10
−
7
Zeige Datei @
513be377
...
...
@@ -27,16 +27,19 @@ function ($searchParams) {
$perPage
=
(
int
)
$searchParams
[
'perPage'
];
}
$list
=
BillingPlans
::
getBillingPlanList
(
$startId
,
$perPage
);
$Result
=
BillingPlans
::
getBillingPlanList
(
$startId
,
$perPage
);
$billingPlans
=
[];
$count
=
0
;
if
(
!
empty
(
$list
))
{
$billingPlans
=
$list
[
'data'
];
$count
=
count
(
$billingPlans
);
foreach
(
$Result
->
autoPagingIterator
()
as
$BillingPlan
)
{
$billingPlans
[]
=
$BillingPlan
->
toArray
();
}
$count
=
0
;
if
(
!
empty
(
$billingPlans
))
{
$count
=
\count
(
$billingPlans
);
if
(
$
list
[
'
has_more
'
]
)
{
if
(
$
Result
->
has_more
)
{
$count
++
;
}
}
...
...
This diff is collapsed.
Zum Erweitern klicken.
src/QUI/ERP/Payments/Stripe/PaymentMethods/Recurring/BillingPlans.php
+
5
−
12
Zeige Datei @
513be377
...
...
@@ -8,6 +8,7 @@
use
QUI\ERP\Payments\Stripe\Provider
;
use
QUI\ERP\Payments\Stripe\AbstractBasePayment
;
use
QUI\ERP\Products\Handler\Products
as
ProductsHandler
;
use
Stripe\Collection
;
use
Stripe\Exception\ApiErrorException
;
use
Stripe\Product
as
StripeProduct
;
use
Stripe\Plan
as
StripePlan
;
...
...
@@ -116,7 +117,7 @@ public static function deleteBillingPlan($planId)
*
* @param string $startId (optional) - Stripe plan ID to start from
* @param int $pageSize (optional) - Number of plans per page [range: 1 to 100]
* @return
array
* @return
Collection
*
* @throws ApiErrorException
*/
...
...
@@ -134,19 +135,11 @@ public static function getBillingPlanList($startId = null, $pageSize = 10)
'limit'
=>
$pageSize
];
// if ($startId) {
// $searchParams['starting_after'] = $startId;
// }
$billingPlans
=
[];
$results
=
StripePlan
::
all
(
$searchParams
);
foreach
(
$results
->
autoPagingIterator
()
as
$BillingPlan
)
{
$billingPlans
[]
=
$BillingPlan
->
toArray
();
if
(
$startId
)
{
$searchParams
[
'starting_after'
]
=
$startId
;
}
return
$billingPlans
;
return
StripePlan
::
all
(
$searchParams
)
;
}
/**
...
...
This diff is collapsed.
Zum Erweitern klicken.
Vorschau
0%
Wiederholen
oder
Neue Datei anhängen
.
Abbrechen
You are about to add
0
people
to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Kommentar speichern
Abbrechen
Bitte
registrieren
oder
Anmelden
zum Kommentieren