2017 © Pedro Peláez
 

elgg-plugin stripe

This plugin provides an Elgg API layer for interfacing with Stripe

image

arckinteractive/stripe

This plugin provides an Elgg API layer for interfacing with Stripe

  • Friday, October 13, 2017
  • by beck24
  • Repository
  • 11 Watchers
  • 4 Stars
  • 79 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 12 Versions
  • 4 % Grown

The README.md

Stripe

Stripe.com API Layer for Elgg, (*1)

The plugin is intended primarily for developers, who are implementing a payments flow., (*2)

Intro

This plugin implements an API Layer for interfacing with Elgg. It implements most common methods, including creating and updating customers, creating charges, adding and removing cards etc., (*3)

The goal is to provide a uniform API that works with Elgg's entity architecture, this includes maintaining references between, for example, Elgg users and Stripe customers., (*4)

The plugin also provides a UI for users to manage their payment methods, view their transaction history, etc., (*5)

Architecture is such as to avoid storing data in Elgg, where possible, so your site stays PCI compliant, while entertaining broad e-commerce possibilities., (*6)

The plugin provides API for creating/updating/deleting/viewing: * Customers * Cards * Charges * Plans * Subscriptions * Invoices, (*7)

Additional features, such as Stripe Connect or transfers, can/might be implemented in separate plugins., (*8)

Security Considerations

It is the responsibility of the site owner to enable SSL encryption, as well as taking additional precautions to protect users from unauthorized access to their personal data (even though it is not stored in the Elgg database, some information will made available to viewers in real-time) as well as from unauthorized payments for goods on the site (in case the credit card is stored with the customer entity)., (*9)

It is perhaps a good idea to ensure that user sessions time out regularly, or that stripe-related pages are password protected., (*10)

Webhooks

To ensure that Elgg receives some crucial updates, please set up your Stripe webhooks as follows:, (*11)

Testing https://YOUR-SITE/services/api/rest/json?method=stripe.webhooks&environment=sandbox, (*12)

Live https://YOUR-SITE/services/api/rest/json?method=stripe.webhooks&environment=production, (*13)

Once you have set up the webhooks, you can add handlers for $stripe_event_type, 'stripe.events' plugin hook in Elgg to implement additional logic. Your callback function will receive a Stripe event object and an environment descriptor., (*14)

A list of Stripe events can be found here: https://stripe.com/docs/api#event_types, (*15)

Customers

Customers are created automagically, whenever you pass an email, user guid or user entity to the API., (*16)

Whenever a user is registered with an email has a Stripe customer account, Stripe customer will be mapped to that user and the transaction history will be available to the user., (*17)

Example: adding a card

$token = get_input('token'); // this would have been generated by stripe.js
$user = elgg_get_logged_in_user_entity();

$client = new StripeClient();
$client->createCard($user, $token);

Example: creating a charge


$user_guid = elgg_get_logged_in_user_guid(); $charge = array( 'amount' => 12545, // amount in cents 'currency' => 'USD', 'card' => $card_id, // optional if the customer has a card on file 'metadata' => array( 'cart_guid' => $cart_guid, 'shop_guid' => $shop_guid, ), ); $client = new StripeClient(); $client->createCharge($user_guid, $charge);

The Versions

13/10 2017

dev-master

9999999-dev http://arckinteractive.com

This plugin provides an Elgg API layer for interfacing with Stripe

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

plugin payments stripe elgg

13/10 2017

2.1.7

2.1.7.0 http://arckinteractive.com

This plugin provides an Elgg API layer for interfacing with Stripe

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

plugin payments stripe elgg

21/04 2017

2.1.6

2.1.6.0 http://arckinteractive.com

This plugin provides an Elgg API layer for interfacing with Stripe

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

plugin payments stripe elgg

16/02 2017

2.1.5

2.1.5.0 http://arckinteractive.com

This plugin provides an Elgg API layer for interfacing with Stripe

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

plugin payments stripe elgg

16/02 2017

2.1.4

2.1.4.0 http://arckinteractive.com

This plugin provides an Elgg API layer for interfacing with Stripe

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

plugin payments stripe elgg

16/02 2017

2.1.3

2.1.3.0 http://arckinteractive.com

This plugin provides an Elgg API layer for interfacing with Stripe

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

plugin payments stripe elgg

15/02 2017

2.1.2

2.1.2.0 http://arckinteractive.com

This plugin provides an Elgg API layer for interfacing with Stripe

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

plugin payments stripe elgg

02/02 2017

2.1.1

2.1.1.0 http://arckinteractive.com

This plugin provides an Elgg API layer for interfacing with Stripe

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

plugin payments stripe elgg

02/02 2017

2.1.0

2.1.0.0 http://arckinteractive.com

This plugin provides an Elgg API layer for interfacing with Stripe

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

plugin payments stripe elgg

03/02 2016

dev-2.x-dev

dev-2.x-dev http://arckinteractive.com

This plugin provides an Elgg API layer for interfacing with Stripe

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

plugin payments stripe elgg

27/01 2016

v1.0

1.0.0.0 http://arckinteractive.com

This plugin provides an Elgg API layer for interfacing with Stripe

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

plugin payments stripe elgg

12/06 2014

1.8.x-dev

1.8.9999999.9999999-dev http://arckinteractive.com

This plugin provides an Elgg API layer for interfacing with Stripe

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

plugin payments stripe elgg