Reference
Caution! For standard workflows you don't need to use any of the following methods. They serve special purposes where you need more control.
paymentForm.processPaymentData(totalGross, currency, success, error)
paymentForm.payerDataChanged(customerData)
paymentForm.processPaymentData(totalGross, currency, success, error)
processPaymentData
sends the payment data to the PSP and returns the processed data or an error. This enables you to do further checks on this data, e.g. BIN checks (CC), bank country (Debit). All PSPs which support PSD2 can be used with this method. Please note
that this method is not meant to validate payment data!
Property | Type | Description |
---|---|---|
totalGross | decimal | To get the value you have to do a Signup.preview(...) which returns preview.Order.TotalGross |
currency | string | To get the value you have to do a Signup.preview(...) which returns preview.Order.Currency |
success
{
"bearer": {
"pseudoCardPan": "4111111111111111",
"TruncatedCardPan": "****",
"ExpiryMonth": "12",
"ExpiryYear": "2030",
"Holder": "Marcellus Wallace"
},
"selectedPaymentMethod": "CreditCard:FakeProvider",
"returnUrl": "https://sandbox.billwerk.com/portal/finalize.html"
}
paymentForm.payerDataChanged(customerData)
Sends the customer data to the paymentForm
. This is needed as the form does not know anything about the customers data so far. Must be called on changes to the customer data.
Property | Type | Description |
---|---|---|
customerData | customerData | Information about the customer such as name, address, VAT ID, etc. This information is required already because the final price might depend on the country of residence, VAT ID, etc. |