@@ -18,21 +18,19 @@ const CENTS_TO_CURRENCY_UNIT = 100;
1818
1919export function SuccessContent ( ) {
2020 const searchParams = useSearchParams ( ) ;
21- const checkoutId = searchParams . get ( "checkout_id " ) ;
21+ const paymentId = searchParams . get ( "payment_id " ) ;
2222
23- const checkoutDetails = useQuery (
24- api . polar . queries . getCheckoutDetails ,
25- checkoutId ? { checkoutId } : "skip"
23+ const paymentDetails = useQuery (
24+ api . payments . queries . getPaymentDetails ,
25+ paymentId ? { paymentId } : "skip"
2626 ) ;
2727
28- if ( ! checkoutId ) {
28+ if ( ! paymentId ) {
2929 return (
3030 < Card className = "w-full max-w-md" >
3131 < CardHeader className = "text-center" >
3232 < CardTitle className = "text-2xl" > Invalid Request</ CardTitle >
33- < CardDescription >
34- No checkout ID provided in the URL
35- </ CardDescription >
33+ < CardDescription > No payment ID provided in the URL</ CardDescription >
3634 </ CardHeader >
3735 < CardContent >
3836 < Button asChild className = "w-full" >
@@ -43,7 +41,7 @@ export function SuccessContent() {
4341 ) ;
4442 }
4543
46- if ( checkoutDetails === undefined ) {
44+ if ( paymentDetails === undefined ) {
4745 return (
4846 < Card className = "w-full max-w-md" >
4947 < CardHeader className = "text-center" >
@@ -59,13 +57,13 @@ export function SuccessContent() {
5957 ) ;
6058 }
6159
62- if ( ! checkoutDetails ) {
60+ if ( ! paymentDetails ) {
6361 return (
6462 < Card className = "w-full max-w-md" >
6563 < CardHeader className = "text-center" >
6664 < CardTitle className = "text-2xl" > Order Not Found</ CardTitle >
6765 < CardDescription >
68- We couldn't find an order with this checkout ID
66+ We couldn't find an order with this payment ID
6967 </ CardDescription >
7068 </ CardHeader >
7169 < CardContent >
@@ -77,7 +75,7 @@ export function SuccessContent() {
7775 ) ;
7876 }
7977
80- const { order, credits } = checkoutDetails ;
78+ const { order, credits } = paymentDetails ;
8179
8280 return (
8381 < Card className = "w-full max-w-md" >
0 commit comments