angular-paymill

0.0.1 • Public • Published

angular-paymill

IMPORTANT: This is not an official project by Paymill!

Install

npm install --save-dev angular-paymill

Usage

Embed the module in your html.

<script src="/node_modules/angular-paymill/dest/Paymill.js"></script>

Set the module as dependency to your angular application.

 
var app = angular.module('app', ['pd.paymill']);
 

PaymillProvider

app.config(['PaymillProvider', function(PaymillProvider) {
 
    PaymillProvider
        .setPublicKey('517113797587d2ba3ee19bd646ffb7f1')
        .setSignetUrl('http://lorempixel.com/400/200/sports/')
 
}]);

paymill-subscribe-button

The controller part ...

app.run(['$rootScope', function($rootScope) {
 
    $rootScope.config = {
        buttonLabel: 'Abo jetzt!',
        modalTitle: 'Abo',
        submitButtonLabel: '2.50 EUR/Monat',
        product: {
            description: 'Ein Jahr On-Demand',
            amount: 250,
            currency: 'EUR',
        },
        lang: 'de-DE',
        onToken: function(token) {
            console.log(token);
        }
    };
    
    // Alternatively to config.onToken you can set an on-token attribute
    $rootScope.handleToken = function(token) {
        console.log(token);
    };
 
 
}]);

And the view part ...

<paymill-subscribe-button on-token="handleToken(token)" config="config"></paymill-subscribe-button>

Author

Christian Blaschke mail@platdesign.de

Readme

Keywords

none

Package Sidebar

Install

npm i angular-paymill

Weekly Downloads

0

Version

0.0.1

License

none

Last publish

Collaborators

  • platdesign