I would like to pursue making a website widget that can allow visitors to donate to the developer’s Starbucks card (similar to a PayPal donation widget). My initial naive implementation was to bring the user to the Starbuck’s eGift page and then use JavaScript to autopopulate most of the form. However, this would be considered cross-site scripting.
Is there an acceptable way for me to send data to the Starbucks eGift form and accomplish what I want? Or is there a different approach that would work? A coworker mentioned the PayPal API but I’m not sure that would work to hook into reloading the Starbucks card.
Requirements:
- The donator should be able to click the widget, enter in their name/email address (optional?), PayPal or account information, and the amount they want to donate, and the card would be reloaded.
You can do it with this code:
just replace the card number with your own.
Also, I made a WordPress widget for this: http://wordpress.org/extend/plugins/starbucks-reload/
Edit- the url changed from https://www.starbucks.com/card/manage/guest-reload to https://www.starbucks.com/card/reload/one-time