Skip to content

Instantly share code, notes, and snippets.

Created May 1, 2012 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/2571089 to your computer and use it in GitHub Desktop.
Save anonymous/2571089 to your computer and use it in GitHub Desktop.
<doc_gt7> Question: On Shop -> Subscription, at the bottom there a field for: Execute on subscription that runs a perl script when purchased. Is
+there a way to pass the userId, payment amount, or any other details to this script?
> if something isn't computational intractable, then there is always a way.
> that way often involves code modifications, though.
> computationally
> and that looks to be the case here.
> patches welcome. I agree, this should be passing some useful arguments.
> line 85 of WebGUI/Asset/Sku/Subscription is system($command) if ($self>get('executeOnSubscription') ne "");
> that's after macros are expanded. I guess macros could pick out the username and you could depend on shell expansion to do the right thing.
> that's a security minefield, but you could do that.
> I'd personally rather see system($command, $user->getId, $self->getId, etc, etc)
> ^#; in the executeOnSubscription string should do the trick.
> for userId. payment amount... not so much. but you could probably tease that out of the database.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment