Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed insert new payment
  • Loading branch information
Jeremy Mill committed Dec 7, 2015
1 parent 6459541 commit 6b4334d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
14 changes: 10 additions & 4 deletions TeamDBAwesome/TeamDBAwesome/Controllers/TestController.cs
Expand Up @@ -15,15 +15,21 @@ namespace TeamDBAwesome.Controllers
// GET: api/Test
public HttpResponseMessage Get()
{
CustomPlaylistId newid = new CustomPlaylistId
Payment payment = new Payment
{
Name = "apitest",
CustomerId = 16
CustomerId = 3,
Type = "AP",
token = "asdoijso",
email = "bob@bob.com",
cardnum = "123",
expr_date = "2015-05-15",
is_default = 0,
PayId = 0
};

MySqlService sqlS = new MySqlService();

sqlS.NewCustomPlaylist(newid);
sqlS.AddPayment(payment);



Expand Down
6 changes: 3 additions & 3 deletions TeamDBAwesome/TeamDBAwesome/SqlService/MySqlService.cs
Expand Up @@ -263,13 +263,13 @@ namespace TeamDBAwesome.SqlService
}
else if (payment.Type == "AP")
{
PayTypeInsert = "insert into applepay(PayId,ApplePayToken) VALUES (" + newPayId + "," +
payment.token + ")";
PayTypeInsert = "insert into applepay(PayId,ApplePayToken) VALUES (" + newPayId + ",\"" +
payment.token + "\")";
}
else if (payment.Type == "GP")
{
PayTypeInsert = "insert into googlepay(PayId,GoogleEmail,GoogleToken) VALUES (" + newPayId + ",\"" +
payment.email + "\"," + payment.token + ")";
payment.email + "\",\"" + payment.token + "\")";
}
else
{
Expand Down

0 comments on commit 6b4334d

Please sign in to comment.