Giter Site home page Giter Site logo

laravelduskautopay's Introduction

Auto Payments Using Laravel Dusk

Okay, so Laravel dusk is pretty amazing. The other day I was making my utility payment online which I encountered my monthly frustration of "Why don't these fools have an autopayment option?" If only I could emulate my steps to making the payment. Then it dawned on meβ€”I could use Laravel Dusk!

It took me about 15 minutes to write the browser test that submits the payment (see UtilityPayment.php).

The next step was to setup my Mac to run php artisan dusk. To do this we will use Automator which comes with all Macs

Step #1: Open Automator, Select "Application"

alt tag

Step #2: Select "Run Apple Script"

alt tag

Step #3: Enter the following code, then save the application. I called mine "Pay."

on run {input, parameters}
	tell application "Terminal"
		activate
		do script with command "cd ~/Code/Projects/dusk && php artisan dusk"
	end tell
end run

alt tag

Step #4: Create calendar alarm

alt tag

Step #5: Select "Launch Application"

alt tag

Step #6: Select the the Pay application we created.

alt tag

Step #7: Go into your calendar and adjust your calendar event to match.

alt tag

That's it!.

laravelduskautopay's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

laravelduskautopay's Issues

absolute url must be set in .env file

I don't know if this is a new feature of Laravel Dusk 2.0 but it took me a while to figure out why I couldn't reach an external website using Dusk and basing it off your Payment page example

turns out the only way I could get it to work is by setting the APP_URL to the absolute url

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.