Use Server to Server : Connect through the JAVA SDK provided by MoneyCollect.
1. Set up MoneyCollect
Firstly, make sure that you have set up an account name on the MoneyCollect dashboard.
2. Create PaymentMethod
PaymentMethod is the necessary prerequisite to charge.
PaymentMethod can specify different payment methods,such as credit cards, Alipay, WeChat Pay, etc. Different payment methods require different parameters. For example: Billing information and card information are required for credit cards, but not for Alipay.
The following code shows how to create a PaymentMethod through the SDK:
For some transactions, customers may be required to perform verification actions, such as 3D secure authentication or Alipay to scan code. Payment will return nextAction when confirming the charge. At this time, you need to do additional actions, redirect or display the QR code according to the different type of nextAction.
After the payment is completed, we will return the result to thereturnUrlyou set and send a notification tonotifyUrl. You can also inquire the result of this payment through API or SDK.
There are several test cards you can use to make sure your integration is ready for production. Use them with any CVC, postal code, and future expiration date.
Card Number
Brand
Description
4242 4242 4242 4242
Visa
Succeeds and immediately processes the payment.
3566 0020 2036 0505
JCB
Succeeds and immediately processes the payment.
6011 1111 1111 1117
Discover
Succeeds and immediately processes the payment.
3782 8224 6310 0052
American Express
Succeeds and immediately processes the payment.
5555 5555 5555 4444
Mastercard
Succeeds and immediately processes the payment.
4000002500003155
Visa
This card requires 3D authentication on all transaction