Use auto payments with paypal (#472)

* Use auto payments with paypal

* Remove sandbox key
This commit is contained in:
Geometrically authored and GitHub committed 2022-11-07 15:38:25 -07:00
1 parent 35891c74cd
commit 2c1bcaafc1
18 files changed
+1424 -825

No files matched your search

+7 -2
View File
@@ -1,7 +1,7 @@
use crate::database;
use crate::database::models;
use crate::database::models::project_item::QueryProject;
use crate::models::users::{Role, User, UserId};
use crate::models::users::{Role, User, UserId, UserPayoutData};
use crate::routes::ApiError;
use actix_web::http::header::HeaderMap;
use actix_web::web;
@@ -73,7 +73,12 @@ where
created: result.created,
role: Role::from_string(&result.role),
badges: result.badges,
paypal_email: result.paypal_email,
payout_data: Some(UserPayoutData {
balance: result.balance,
payout_wallet: result.payout_wallet,
payout_wallet_type: result.payout_wallet_type,
payout_address: result.payout_address,
}),
}),
None => Err(AuthenticationError::InvalidCredentials),
}