Business::Giropay - Giropay payments API
Version 0.103
Business::Giropay implement's Giropay's GiroCheckout API to make direct calls to Giropay's payments server.
Giropay facilitates payments via various provider networks in addition to their own. This module currently supports the following networks:
Contributions to allow this module to support other networks available via Giropay are most welcome.
use Business::Giropay; my $giropay = Business::Giropay->new( network => 'giropay', merchantId => '123456789', projectId => '1234567', sandbox => 1, secret => 'project_secret', ); my $response = $giropay->transaction( merchantTxId => 'tx-10928374', amount => 2938, # 29.38 in cents currency => 'EUR', purpose => 'Test Transaction', bic => 'TESTDETT421', urlRedirect => 'https://www.example.com/return_page', urlNotify => 'https://www.example.com/api/giropay/notify', ); if ( $response->success ) { # all is good so redirect customer to GiroCheckout } else { # transaction request failed }
urlRedirect and urlNotify can also be passed to new:
urlRedirect
urlNotify
new
use Business::Giropay; my $giropay = Business::Giropay->new( network => 'giropay', merchantId => '123456789', projectId => '1234567', urlRedirect => 'https://www.example.com/return_page', urlNotify => 'https://www.example.com/api/giropay/notify', sandbox => 1, secret => 'project_secret', ); my $response = $giropay->transaction( merchantTxId => 'tx-10928374', amount => 2938, # 29.38 in cents currency => 'EUR', purpose => 'Test Transaction', bic => 'TESTDETT421', ); if ( $response->success ) { # all is good so redirect customer to GiroCheckout } else { # transaction request failed }
Elsewhere in your urlNotify route:
my $notification = $giropay->notification( %request_params ); if ( $notification->success ) { # save stuff in DB - customer probably still on bank site } else { # bad stuff happened - make a note of it }
And in the urlRedirect route:
my $notification = $giropay->notification( %request_params ); if ( $notification->success ) { # we should already have earlier notification but check anyway # in case customer came back before we received it then thank # customer for purchase } else { # bad stuff - check out the details and tell the customer }
See "ATTRIBUTES" in Business::Giropay::Role::Core for full details of the following attributes that can be passed to new.
network
merchantId
projectId
sandbox
secret
See "ATTRIBUTES" in Business::Giropay::Role::Urls for full details of the following attributes that can be passed to new.
NOTE: it is not necessary to pass in any attributes that were already passed to new since they are passed through automatically.
This API call checks if a bank supports the giropay/eps payment method.
Returns a Business::Giropay::Response::Bankstatus object.
See "ATTRIBUTES" in Business::Giropay::Request::Bankstatus for full details of the following attribute that can be passed to this method:
bic
Returns a Business::Giropay::Response::Issuer object which includes a list which contains all supported giropay/eps/ideal issuer banks.
This API call creates the start of a transaction and returns a Business::Giropay::Response::Transaction object. If the response indicates success then customer can be redirected to "redirect" in Business::Giropay::Response::Transaction to complete payment.
Returns a Business::Giropay::Response::Transaction object.
See "ATTRIBUTES" in Business::Giropay::Request::Transaction for full details of the following attributes that can be passed to this method:
merchantTxId
amount
currency
purpose
Accepts query parameters and returns a Business::Giropay::Notification object.
Returns a Business::Giropay::Response::Status object with details of the requested transaction.
See "ATTRIBUTES" in Business::Giropay::Request::Status for full details of the following attribute that can be passed to this method:
reference
GiroCheckout API which has links for the various payment network types (giropay, eps, etc). For "status" see http://api.girocheckout.de/en:tools:transaction_status.
Add more of Giropay's payment networks.
Peter Mottram (SysPete) <peter@sysnix.com>
Alexandr Ciornii (chorny)
Many thanks to CALEVO Equestrian for sponsoring development of this module.
Copyright 2016 Peter Mottram (SysPete) <peter@sysnix.com>
This program is free software; you can redistribute it and/or modify it under the terms of Perl itself.
To install Business::Giropay, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::Giropay
CPAN shell
perl -MCPAN -e shell install Business::Giropay
For more information on module installation, please visit the detailed CPAN module installation guide.