Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Support Fatsoma payment process #1

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
6b23c00
Add Webhook Endpoints API
biinari May 5, 2021
f92f63d
Fix LOCALSTRIPE_SOURCE when not last script in page
biinari May 6, 2021
a95b869
Accounts: implement Account resource
biinari May 6, 2021
6598891
Server: Redirect to remove trailing slash from URL
biinari May 6, 2021
278defa
Resources: add details to bad request errors
biinari May 6, 2021
07d6b3e
fix(javascript): use normal function for Stripe
biinari May 6, 2021
7757bf6
feat(js): Implement paymentRequest
biinari May 7, 2021
63a2a54
feat(js Element): Support different card* types
biinari May 7, 2021
dfac2b5
feat(js Element): Add off()
biinari May 7, 2021
fd47d85
feat(js Element): Add blur, focus, clear, update methods
biinari May 7, 2021
1903cae
feat(js Element): Pass change event
biinari May 7, 2021
9f811d3
feat(js Element): Trigger focus, blur on input events
biinari May 7, 2021
09bebcc
Add createPaymentMethod
biinari Jul 6, 2021
32493b3
Support customers list all email param
biinari Jul 26, 2021
ea0c5b4
Add payment_intent webhooks
biinari Jul 27, 2021
60de803
Add PaymentMethod webhook events
biinari Jul 27, 2021
bf47d0c
Return webhook in custom config webhook endpoint
biinari Jul 27, 2021
f8308b6
Support old confirmPaymentIntent()
biinari Sep 9, 2021
b00129e
Allow requires_confirmation status for payment intent _authenticate
biinari Sep 9, 2021
3a6a5b8
Log sending webhooks
biinari Sep 9, 2021
6e5c26c
Add Dockerfile
biinari Sep 9, 2021
1c7b3f4
Build from scratch for docker
biinari Sep 9, 2021
410904b
Configure webhooks for docker based on env / vault
biinari Oct 5, 2021
7f4339f
Add Makefile to manage docker
biinari Oct 5, 2021
1ea169a
Add /_status endpoint
biinari Oct 5, 2021
8c368af
Skip logging status requests
biinari Oct 6, 2021
f98d044
docker entrypoint: Exit on error
biinari Oct 6, 2021
1fbbb64
Restore webhooks from pickled data
biinari Oct 19, 2021
1d9489e
Add closing quote for request log
biinari Oct 19, 2021
369a9e0
Delete payment intent after success
biinari Nov 9, 2021
5eefbbf
Add webhook endpoint config from json in stdin
biinari Nov 11, 2021
556f989
Arg --no-save to skip dump to disk
biinari Nov 11, 2021
26309ef
Set from-scratch and no-save in docker entrypoint
biinari Nov 11, 2021
5b03d48
Update to aws ecr get-login-password
ednp Sep 6, 2022
9c28141
Merge pull request #2 from Fatsoma/update/ecr_login
ednp Sep 6, 2022
afcde53
Fix docker run locally
biinari Jun 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions localstripe/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@ def __init__(self, code, message=None, contents=None):
self.body['error']['message'] = message

def to_response(self):
if self.__cause__ is not None:
self.body['error']['message'] += ': ' + repr(self.__cause__)

return json_response(self.body, status=self.code)
17 changes: 16 additions & 1 deletion localstripe/localstripe-v3.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,22 @@
// First, get the domain from which this script is pulled:
const LOCALSTRIPE_SOURCE = (function () {
const scripts = document.getElementsByTagName('script');
const src = scripts[scripts.length - 1].src;
var src;

for (var i = 0; i < scripts.length; i++) {
src = scripts[i].src;
if (!src) {
continue;
}

var m = src.match(/((?:https?:)\/\/[^\/]*)\/js\.stripe\.com\/v3/);
if (m) {
return m[1];
}
}

// fallback on last script tag
src = scripts[scripts.length - 1].src;
return src.match(/https?:\/\/[^\/]*/)[0];
})();

Expand Down
Loading