public class

PMFactory

extends Object
java.lang.Object
   ↳ com.paymill.android.factory.PMFactory

Class Overview

Use only this factory class to create a PMPaymentMethod and PMPaymentParams.

Summary

Public Methods
static PMPaymentMethod genCardPayment(String accountholder, String cardnumber, String expiryMonth, String expiryYear, String verification)
Generates a PaymentMethod from credit/debit card details.
static PMPaymentMethod genDirectDebitPayment(String accountHolder, String accountNumber, String bankNumber, String country)
This method is deprecated. This method is for the "old" ELV German payment. Use PMFactory#genIbanBicPayment(String, String, String) instead.
static PMPaymentMethod genGermanDirectDebitPayment(String accountHolder, String accountNumber, String bankNumber)
This method is deprecated. This method is for the "old" ELV German payment. Use PMFactory#genIbanBicPayment(String, String, String) instead.
static PMPaymentMethod genIbanBicPayment(String accountHolder, String iban, String bic)
Generates a PaymentMethod for a direct debit payment.
static PMPaymentParams genPaymentParams(String currency, int amount, String description)
Use this method to generate the PaymentParams object, needed for creating transactions, preauthorizations and tokens.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static PMPaymentMethod genCardPayment (String accountholder, String cardnumber, String expiryMonth, String expiryYear, String verification)

Generates a PaymentMethod from credit/debit card details.

Important: You should neither save this data, nor send it to your server!

Returns
  • the payment method.

public static PMPaymentMethod genDirectDebitPayment (String accountHolder, String accountNumber, String bankNumber, String country)

This method is deprecated.
This method is for the "old" ELV German payment. Use PMFactory#genIbanBicPayment(String, String, String) instead.

Generates a PaymentMethod from direct debit payment details.

Important: You should neither save this data, nor send it to your server!

Parameters
accountHolder first and second name of the account holder
accountNumber account number
bankNumber bank code
country ISO 3166-2 formatted country code
Returns
  • the payment method.

public static PMPaymentMethod genGermanDirectDebitPayment (String accountHolder, String accountNumber, String bankNumber)

This method is deprecated.
This method is for the "old" ELV German payment. Use PMFactory#genIbanBicPayment(String, String, String) instead.

Generates a PaymentMethod for German direct debit payment details.

Important: You should neither save this data, nor send it to your server!

Parameters
accountHolder first and second name of the account holder
accountNumber account number
bankNumber bank code
Returns
  • the payment method.

public static PMPaymentMethod genIbanBicPayment (String accountHolder, String iban, String bic)

Generates a PaymentMethod for a direct debit payment.

Important: You should neither save this data, nor send it to your server!

Parameters
accountHolder first and second name of the account holders
iban an IBAN number, as defined in ISO 13616
bic a BIC number, as defined in ISO 9362
Returns
  • the payment method.

public static PMPaymentParams genPaymentParams (String currency, int amount, String description)

Use this method to generate the PaymentParams object, needed for creating transactions, preauthorizations and tokens.

Parameters
currency Three character ISO 4217 formatted currency code.
amount amount (in cents) which will be charged
description a short description for the transaction (e.g. shopping cart ID) or empty string or null.

Note: You don't need to supply a description parameter when generating a token.

Returns
  • the parameters, which you can use in the SDK.