-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Please note that this SDK still contains some references to the previous 'Beanstream' name.
Also check out our main developer documentation located at dev.na.bambora.com
Head over to the Quick Start Guide and create a developer sandbox account. Take note of the Merchant ID it gives you.
Check out the source here and build the jar file.
Add the jar file to your project.
Create a test class in your Java project and add the following code to your main method.
Gateway beanstream = new Gateway("v1", YOUR_MERCHANT_ID, "YOUR_API_KEY");
CardPaymentRequest req = new CardPaymentRequest();
req.setAmount("100.00")
.setMerchantId("300200578")
.setOrderNumber(getRandomOrderId("test"));
req.getCard()
.setName("John Doe")
.setNumber("5100000010001004")
.setExpiryMonth("12")
.setExpiryYear("18")
.setCvd("123");
PaymentResponse response = beanstream.payments().makePayment(req);
Switch the MerchantId variable's value from YOUR_MERCHANT_ID to your actual merchant ID.
Next, head to the [Merchant Member Area](https://web.na.bambora.com/admin/sDefault.asp and navigate to
Administration -> Account -> Order Settings
Copy the API Key and replace the ApiKey variable's "YOUR_API_KEY" with your actual API key.
Run the code to make a payment!