Rocky_Mountain_Vending/.pnpm-store/v10/files/ec/11a2602aec155cd8d761f6ba7ad07c00982a587666bd1df2fe3802c8f1c07d2a02a9bed03b2c5fe8498aef1c3cb4ac4807c0b6903f3f726e241bc113b5a805
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

42 lines
1.3 KiB
Text

'use strict';
import { StripeResource } from '../StripeResource.js';
import { queryStringifyRequestData } from '../utils.js';
const stripeMethod = StripeResource.method;
const oAuthHost = 'connect.stripe.com';
export const OAuth = StripeResource.extend({
basePath: '/',
authorizeUrl(params, options) {
params = params || {};
options = options || {};
let path = 'oauth/authorize';
// For Express accounts, the path changes
if (options.express) {
path = `express/${path}`;
}
if (!params.response_type) {
params.response_type = 'code';
}
if (!params.client_id) {
params.client_id = this._stripe.getClientId();
}
if (!params.scope) {
params.scope = 'read_write';
}
return `https://${oAuthHost}/${path}?${queryStringifyRequestData(params)}`;
},
token: stripeMethod({
method: 'POST',
path: 'oauth/token',
host: oAuthHost,
}),
deauthorize(spec, ...args) {
if (!spec.client_id) {
spec.client_id = this._stripe.getClientId();
}
return stripeMethod({
method: 'POST',
path: 'oauth/deauthorize',
host: oAuthHost,
}).apply(this, [spec, ...args]);
},
});