Skip to content

Instantly share code, notes, and snippets.

View paladintodd's full-sized avatar

paladintodd paladintodd

View GitHub Profile
* Ask for a PDF file, grab each page from it, convert to text
* Save resulting text to a pdf.txt file
* Get the file.
PRIVATE lcFile
lcFile = GETFILE("PDF", "Select", "Select")
IF EMPTY(lcFile)
RETURN
ENDIF
local o
o = NEWOBJECT("StripeX")
o.cAPIKey = "YourAPIKey"
IF !o.Authenticate() && Make sure Stripe working
?"Auth", "Failed", o.cErrorMessage
ELSE
?"Good Auth"
endif
SET PROCEDURE TO w:\vfp7com\prog\StripeX ADDITIVE
SET CLASSLIB TO w:\vfp7com\apps\libcurl\libcurl ADDITIVE
local o
o = NEWOBJECT("StripeX")
o.cAPIKey = "YourKey"
IF !o.Authenticate() && Make sure Stripe working
?"Auth", "Failed", o.cErrorMessage
return
SET PROCEDURE TO w:\vfp7com\prog\StripeX ADDITIVE
SET CLASSLIB TO w:\vfp7com\apps\libcurl\libcurl ADDITIVE
local o
o = NEWOBJECT("StripeX")
o.cAPIKey = "YourKeyGoesHere"
IF !o.Authenticate() && Make sure Stripe working
?"Auth", "Failed", o.cErrorMessage
return
@paladintodd
paladintodd / DebugX
Created November 17, 2015 17:43
DebugX
* DebugX: Class for creating messages during debugging.
* Created 11/3/15 by Todd Landrum, todd@paladinpgm.com
* With thanks to:
* Tamar Granor - Who's speed talk at Southwest Fox 2015 inspired the Start, Stop and Loop functions.
* You can use this method to easily add messages to your code for debugging purposes.
* Messagbes can be sent to the debug window or a text file.
* It can be used in a number of ways.
local o
o = NEWOBJECT("StripeX")
o.cAPIKey = "YourAPIKeyHere" && test secret
IF !o.Authenticate() && Make sure Stripe working
?"Auth", "Failed", o.cErrorMessage
return
endif
* Get a customer