-
Notifications
You must be signed in to change notification settings - Fork 41
Square payments #2229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Square payments #2229
Changes from all commits
Commits
Show all changes
191 commits
Select commit
Hold shift + click to select a range
1eb7584
First square commit (copied from Stripe files)
Crabcyborg 2fbf9b6
Merge branch 'master' into square
Crabcyborg 7357138
Merge branch 'master' into square
Crabcyborg 0cf0543
Start loading scripts
Crabcyborg ca7b462
Adding some basic square JS
Crabcyborg 69f1b9b
Send the token/verification tokens as form inputs and submit form
Crabcyborg 72bd0e8
Pass the event, remove test code
Crabcyborg 1df1ab4
Clean up
Crabcyborg 0be809c
Update comments
Crabcyborg 94e1d58
Merge branch 'master' into square
Crabcyborg ecf7cf0
Merge branch 'master' into square
Crabcyborg 34f183a
Add gateways filter and radio button options for selecting gateway
Crabcyborg 233125b
Conditionally show/hide the capture setting when Square is toggled
Crabcyborg 28aeca1
New squareCardElementIsComplete var
Crabcyborg 9e4a5a4
Enable / disable the submit button based on the square element state
Crabcyborg f3778e3
Run lint fix
Crabcyborg b55c669
Merge branch 'master' into square
Crabcyborg 58cf8a1
Prevent form from submitting, clean up
Crabcyborg b325999
Drop the other square test button
Crabcyborg 010d58f
Clean up more
Crabcyborg 93fd9a6
Clean up
Crabcyborg 679d421
Add some comments
Crabcyborg 8077453
Stop using the example square IDs. Use formidable card elements like …
Crabcyborg 579025e
Remove old code
Crabcyborg b459353
Start working on oauth
Crabcyborg a68307c
Start working on oauth
Crabcyborg 1a9bb7d
Set up the oauth/api flow
Crabcyborg 4256121
Rename option
Crabcyborg 8f36fb0
Hard code live mode in a few places for now. Show connected when ther…
Crabcyborg 6db04b4
Set up some code for creating payments
Crabcyborg ed17f17
Show error
Crabcyborg 23092d1
Merge branch 'master' into square
Crabcyborg 55ae36a
Merge branch 'master' into square
Crabcyborg e6c94a2
Merge branch 'master' into square
Crabcyborg 8afc2a0
Add square test mode checkbox, add cards for mode square modes (incom…
Crabcyborg 5f540aa
Show the test mode in a table like in Stripe, give connect button a c…
Crabcyborg de15644
Fix mode check
Crabcyborg 0fb0f72
Get payment routing mostly working
Crabcyborg c25dda4
Add the payment record into the DB with the charge ID and status
Crabcyborg 9a46206
Define the location ID and app ID in global vars based on the active …
Crabcyborg a250533
Pull the verification details into a PHP fetch request
Crabcyborg 6d6ccf5
Properly route the settings for addreses and emails
Crabcyborg 4599bd3
Merge branch 'master' into square
Crabcyborg 3c464ed
Capitalize the Square gateway
Crabcyborg bd8cdbe
Get refunds working
Crabcyborg e3774db
Add todo comment
Crabcyborg e0bdd6b
Working on subscriptions (wip)
Crabcyborg 6ff87d3
More work on subscriptions (wip)
Crabcyborg ab4692d
Merge branch 'master' into square
Crabcyborg 6c53895
Add new square.scss
Crabcyborg ff89fb3
Merge branch 'master' into square
Crabcyborg c554e89
Start trying to match the field styles
Crabcyborg 778893e
Merge branch 'master' into square
Crabcyborg f5b7ae2
Also add border radius and focus border color, and a filter
Crabcyborg 48c984a
Also add font family
Crabcyborg 86ea471
Merge branch 'master' into square
Crabcyborg 9d23915
Merge branch 'master' into square
Crabcyborg e7358e3
Continue to work on subscriptions
Crabcyborg f9a9211
Check the subscription request response and return true
Crabcyborg 0075b2d
Do not load square scripts if Square is not the selected gateway
Crabcyborg 309f899
New maybe show card function to fix an issue with loading Stripe cards
Crabcyborg df48e34
Add backward compatibility check
Crabcyborg 447786e
Merge branch 'master' into square
Crabcyborg 0c20311
Merge master
Crabcyborg 7db4d82
Merge branch 'master' into square
Crabcyborg a97723c
Merge branch 'antispam-improvements' into square
Crabcyborg 206bf03
Merge branch 'antispam-improvements' into square
Crabcyborg 2547d88
Run the show card hook for square after Stripe, add a field ID match …
Crabcyborg b477146
Move before save action settings to the trans actions controller and …
Crabcyborg b183de4
Merge branch 'master' into square
Crabcyborg 908c9c0
Fix issue with repeat setting
Crabcyborg f701ac1
Small improvements to settings
Crabcyborg 2433c5d
Merge branch 'master' into square
Crabcyborg 6a8f240
Add subscriptions into the database
Crabcyborg 2597200
Working on event handling
Crabcyborg bf8a442
Start getting the subscription ID for a given payment
Crabcyborg 813978c
Working on webhooks (wip)
Crabcyborg 5a779a4
Merge branch 'master' into square
Crabcyborg cb3a631
Get cancelling a subscription working
Crabcyborg a75efc8
Work on adding the subscription payment to the db when handling an event
Crabcyborg 4456377
Making progress with webhooks
Crabcyborg 8607e09
Add comments, start working on handling a deactivated subscription event
Crabcyborg 8679e2c
Make disconnecting functional
Crabcyborg 8365960
Remove old comment
Crabcyborg bd6969e
Add typos exception
Crabcyborg 64d21e1
Add default case to avoid undefined $canceled case
Crabcyborg e4360bb
Add default case to avoid undefined $refunded case
Crabcyborg 927dcf2
Move some code
Crabcyborg 99fac02
Fix typo exception
Crabcyborg ef1faa8
Specify square as a psalm dir
Crabcyborg eb4ee12
Add some psalm exceptions for square
Crabcyborg 988a41a
Fix exception for typo in wrong place
Crabcyborg 34079b4
Add a missing stub
Crabcyborg cd44bbf
Drop extra function
Crabcyborg a7a18c2
Fix broken stubs file
Crabcyborg 919be3a
Match types better
Crabcyborg 776dd00
Add missing var
Crabcyborg 1c70dd1
Update Psalm exceptions, add array check
Crabcyborg be6fa26
Fix psalm exception for wrong class
Crabcyborg bd522f9
Update comments
Crabcyborg bef4204
Deprecate unused Stripe function
Crabcyborg 99a78ee
Fix wrong textdomain
Crabcyborg 587c455
Code styling fixes
Crabcyborg 9b46190
Code styling fixes
Crabcyborg a193637
Drop extra semi colon
Crabcyborg d1216de
Code styling fixes
Crabcyborg ac86e09
Specify the live URL
Crabcyborg ad3b0f7
Update comments
Crabcyborg c30c982
Code styling fixes
Crabcyborg b004bad
Clean up
Crabcyborg 9870984
Ignore nonce when making square payments
Crabcyborg 5d8a39c
Drop type comments to prevent full stop issue
Crabcyborg a53cd87
Add full stop
Crabcyborg 87af321
Break up long line
Crabcyborg 65d7f67
Break up another long line
Crabcyborg 121ac5e
Add param comments
Crabcyborg f9a853a
Change Stripe mention to Square
Crabcyborg 6d9cf4c
Ignore long line
Crabcyborg a27c559
Use trialDays for more consistent case
Crabcyborg 8070375
Fix hook not working when saving actions, sync merchant currency when…
Crabcyborg 6d578e6
Add square fee education and update the warning when using a payment …
Crabcyborg 564f4ba
Add location ID and currency as options to avoid too many requests to…
Crabcyborg 2d8c272
Remove old todo comment
Crabcyborg e468935
Update some in-plugin warnings when Stripe is not set up but Square i…
Crabcyborg d3c2917
Show the error message from Square
Crabcyborg 282c4ee
Remove mention of live context when showing ssl warning for Square
Crabcyborg 7b07b9d
Prevent default when clicking connect button
Crabcyborg 2ad9bee
Fix bug with disconnecting Square
Crabcyborg b94b25c
Trigger actions that send on payment success
Crabcyborg a269ed7
Add todo comment
Crabcyborg bc74360
Add JPY check
Crabcyborg 6918524
Stop using dev site, use QA
Crabcyborg 5a47619
Always include the processor column
Crabcyborg e440125
Stop redirecting to /wp-admin/false on error
Crabcyborg 6d52c94
Pass description when creating a one time payment
Crabcyborg 7a77fa8
Merge branch 'master' into square
Crabcyborg d4d3b0f
Work on improving compatibility with the Stripe add-on
Crabcyborg 090ca45
Merge branch 'master' into square
Crabcyborg c248e03
Merge branch 'master' into square
Crabcyborg 831b6f1
Add the functions for verifying a Lite site
Crabcyborg e887a03
Conditionally toggle the fee education based on the selected gateway
Crabcyborg 63af5e6
Add more checks before loading Stripe Lite scripts, load the Square s…
Crabcyborg ebfb591
Fix square script loading issue
Crabcyborg 3a7cda8
Improve compatibility with a multi-page form
Crabcyborg 8597bee
Init square on AJAX page change as well
Crabcyborg dbdee47
Update comment
Crabcyborg 74a606b
Fix equals alignment
Crabcyborg eb2de31
Fix long line issue
Crabcyborg 476a587
Merge branch 'master' into square
Crabcyborg 661da95
Remove some of the bottom margin from the Square payment field
Crabcyborg 258833f
Add a get subscription endpoint and use it to determine the payment b…
Crabcyborg 90f8955
Replace shortcodes in subscription description
Crabcyborg 8ecc439
Add a pop-up with instructions when connecting to Sandbox to help peo…
Crabcyborg c4a0a77
Fix spaces to tabs
Crabcyborg d9b04b6
Cancel subscription on deactivated status
Crabcyborg 1886fa7
Trigger events that trigger on successful payment in events controller
Crabcyborg 7953771
Update next billing date in webhooks
Crabcyborg 62fda82
Show the latest error on subscription create fail
Crabcyborg 689d6a8
Merge branch 'master' into square
Crabcyborg 89a78ca
Fix issue with getting subscription, update how the payment is updated
Crabcyborg 7d64610
Continue cron loop if there is no payment for sub
Crabcyborg a9520fc
Add gateway check before loading Square scripts
Crabcyborg ca54c60
Use API site
Crabcyborg 2aed36f
Psalm tweaks
Crabcyborg 5049fc0
Make a line less long
Crabcyborg 8597c1a
Use fewer PHP open/close tags
Crabcyborg cb8ca32
Fix a long line issue
Crabcyborg d0958ab
Fix invalid psalm xml
Crabcyborg 9596b98
Remove old todo comment
Crabcyborg d2a2f64
Use safe redirect
Crabcyborg 05de015
Use safe redirect for Stripe too
Crabcyborg c57f5b4
Use number format
Crabcyborg 58c78f0
Merge branch 'master' into square
Crabcyborg 9479689
Merge branch 'master' into square
Crabcyborg df5ad15
Merge branch 'master' into square
Crabcyborg 90f78eb
Clean up front end JS
Crabcyborg 771dd44
Stop using unique ID for square front end JS plugin version
Crabcyborg 9037711
Update comment reference to Stripe
Crabcyborg 1c2aeed
Use console.error instead of throwing an error when Square is not ava…
Crabcyborg fdff244
Fix bug with required credit card validation
Crabcyborg 96d3a0b
Add repeat cadence dynamically with JS
Crabcyborg 79ba166
Fix bug when changing gateways
Crabcyborg 83f7032
Only show the capture option for a Stripe payment, fix issues with re…
Crabcyborg 6881913
Fix issues with both repeat options appearing after toggling type
Crabcyborg 091dfde
Default to USD instead of AUD when enabling again
Crabcyborg 074b4b4
Add a check for type before removing display style
Crabcyborg 4b43253
Add nullable check
Crabcyborg 3275eb9
Add nullable check for repeat cadence
Crabcyborg 8cec3d7
Use the correct interval count/interval type when creating a square s…
Crabcyborg 0d0cfa8
phpcs fixes
Crabcyborg ff1c030
Remove some whitespace
Crabcyborg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.