* Web.csproj:

* ThanksHelper.cs:
* YavscHelpers.cs:
* Period.cs:
* YaEvent.cs:
* OpenDay.cs:
* WeekDay.cs:
* Schedule.cs:
* Position.cs:
* EventPub.cs:
* Periodicity.cs:
* ProvidedEvent.cs:
* CalendarController.cs:
* FrontOfficeController.cs:
* PositionAndKeyphrase.cs:
* ProviderPublicInfo.cs: refactoring

* PaypalApiController.cs: adds a package reference to payPal buttons

* T.cs: xml doc

* App.master: yet another thanks giving

* style.css: Yet another impact on style sheet

* Web.config: adds a circle provider section

* packages.config: Adds PayPal Button manager package reference
This commit is contained in:
Paul Schneider 2015-06-26 13:56:39 +02:00
commit ccc3b2ffff
24 changed files with 148 additions and 79 deletions

View file

@ -20,13 +20,13 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Web.Http;
using Yavsc.ApiControllers.Calendar.Model;
using Yavsc.Model.RolesAndMembers;
using System.Web.Security;
using Yavsc.Model.Google;
using Yavsc.Helpers;
using System.Web.Profile;
using Yavsc.Model.Circles;
using Yavsc.Model.Calendar;
namespace Yavsc.ApiControllers

View file

@ -21,28 +21,54 @@
using System;
using System.Web.Http;
#if USEPAYPALAPI
using PayPal.Api;
using PayPal;
using System.Collections.Generic;
using PayPal.OpenIdConnect;
using PayPal.Manager;
using PayPal.PayPalAPIInterfaceService;
using PayPal.PayPalAPIInterfaceService.Model;
namespace Yavsc.ApiControllers
{
/// <summary>
/// Paypal API controller.
/// </summary>
public class PaypalApiController: ApiController
{
public void GetPayments()
PayPalAPIInterfaceServiceService service = null;
/// <summary>
/// Initialize the specified controllerContext.
/// </summary>
/// <param name="controllerContext">Controller context.</param>
protected override void Initialize (System.Web.Http.Controllers.HttpControllerContext controllerContext)
{
OAuthTokenCredential tokenCredential =
new OAuthTokenCredential("<CLIENT_ID>", "<CLIENT_SECRET>");
string accessToken = tokenCredential.GetAccessToken();
var parameters = new PayPal.Util.QueryParameters();
parameters.Add ("Count", "10");
PaymentHistory paymentHistory = Payment.Get(apiContext, accessToken, parameters);
base.Initialize (controllerContext);
// Get the config properties from PayPal.Api.ConfigManager
// Create the Classic SDK service instance to use.
service = new PayPalAPIInterfaceServiceService(ConfigManager.Instance.GetProperties());
}
/// <summary>
/// Search the specified str.
/// </summary>
/// <param name="str">str.</param>
public BMCreateButtonResponseType Create(string str)
{
BMCreateButtonRequestType btcrerqu = new BMCreateButtonRequestType ();
BMCreateButtonReq btcrerq = new BMCreateButtonReq ();
btcrerq.BMCreateButtonRequest = btcrerqu;
BMCreateButtonResponseType btcrere = service.BMCreateButton (btcrerq);
return btcrere;
}
public BMButtonSearchResponseType Search(string str)
{
BMButtonSearchReq req = new BMButtonSearchReq ();
req.BMButtonSearchRequest = new BMButtonSearchRequestType ();
return service.BMButtonSearch (req);
}
}
}
#endif