This should be a common scenario but I could not find any API calls to do this on Global Payments.
Suppose we try to pay something and we then generate and HPP json by doing:
hppJson = service.charge(new BigDecimal(paymentDTO.getAmount()))
.withCurrency(paymentDTO.getCurrency())
.withHostedPaymentData(hostedPaymentData)
.withAddress(billingAddress, AddressType.Billing)
.withAddress(shippingAddress, AddressType.Shipping)
.serialize();
Then after customer gets redirected to the payment page of Global payments, he add card details and pay. If the payment was successful from global payments, it will redirect the user to our specified url. My question is if our services are unavailable when redirecting, is there a way to query that past successful transaction by using anything in that HPP Json? like order ID etc?
This can be accomplished with the following code:
TransactionSummary response = ReportingService.transactionDetail("{YOUR ORDER ID HERE}").execute();
Additional supporting code can be found in the following files within GitHub for the Java SDK.