Skip to content

ITECOMMPAY/paymentpage-sdk-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Test Coverage Maintainability

EcommPay payment page SDK

This is a set of libraries in the Java language to ease integration of your service with the EcommPay Payment Page.

Payment flow

Payment flow

Get URL for payment

Gate gate = new Gate("secret");
Payment payment = new Payment("11");

payment
    .setParam(Payment.PAYMENT_ID, "some payment id")
    .setParam(Payment.PAYMENT_AMOUNT, 1001)
    .setParam(Payment.PAYMENT_CURRENCY, "EUR");

String paymentUrl = gate.getPurchasePaymentPageUrl(payment);

paymentUrl here is the signed URL.

Handle callback from Ecommpay

You'll need to autoload this code in order to handle notifications:

Gate gate = new Gate("secret");
Callback callback = gate.handleCallback(callbackData);

data is the JSON string received from payment system;

callback is the Callback object describing properties received from payment system; callback implements these methods:

  1. callback.getPaymentStatus(); Get payment status.
  2. callback.getPayment(); Get all payment data.
  3. callback.getPaymentId(); Get payment ID in your system.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages