- /auth/login no longer asks for a myshopify domain (App Store 2.3.1). With ?shop= it still hands off to OAuth; otherwise it points to Shopify. - Billing API charges are test charges outside production and on partner development stores (shop.plan.partnerDevelopment), so reviewers can pick a paid plan. Real shops are charged as before. - SCREENCAST.md matches the recording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 lines
607 B
TypeScript
13 lines
607 B
TypeScript
import { type AdminGraphql, gql } from "./guard.server";
|
|
|
|
/**
|
|
* Billing API charges are test charges outside production and on development stores
|
|
* (including App Store reviewers' stores), which can't take real charges. Real shops pay.
|
|
*/
|
|
export async function billingIsTest(admin: AdminGraphql): Promise<boolean> {
|
|
if (process.env.NODE_ENV !== "production") return true;
|
|
const d = await gql<{ shop: { plan: { partnerDevelopment: boolean } } }>(admin, `#graphql
|
|
query DatewiseBillingMode { shop { plan { partnerDevelopment } } }`).catch(() => null);
|
|
return !!d?.shop.plan.partnerDevelopment;
|
|
}
|