-
Notifications
You must be signed in to change notification settings - Fork 1
Description
- We have an issue while making a payment
this result return from the action RapidAPI.submitPayment(transaction);
made by android device
<-- 404 Not Found https://api.ewaypayments.com/payment (1008ms)
Cache-Control: no-store
Content-Type: application/json; charset=utf-8
X-EWAY-SERVER: M3
X-Frame-Options: SAMEORIGIN
X-Powered-By:
Server:
X-EWAY-RAPID: 3.0
p3p: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
X-ASPNET-VERSION:
Content-Length: 42
Date: Sun, 22 Nov 2020 09:33:15 GMT
Connection: close
Set-Cookie: BIGipServerVirtServerPool-019-SSL=!H0d+VCa+FOkcPb88pY5RVVkqfhddARihnAYIQTxzQ10+wNHeSZOozLEQduuVb4svH3FyQqQItDLv9AE=;secure; path=/
Strict-Transport-Security: max-age=15768000
{"Message":"Unknown Result","Errors":null}
<-- END HTTP (42-byte body)
-
Our code looks like this sample
https://github.com/eWAYPayment/eway-rapid-android/tree/master/synchronous%20sample -
Also we used our public API key from EWay settings
and RapidAPI.RapidEndpoint = "https://api.ewaypayments.com/"; -
We set this data while making a payment
CardDetails cardDetails = new CardDetails();
cardDetails.setName(cardName);
cardDetails.setExpiryMonth(expMonth);
cardDetails.setExpiryYear(expYear);
EncryptItemsResponse nCryptedData = encryptCard(cardNumber, CVN);
if (nCryptedData.getErrors() != null) {
return errorHandler(RapidAPI.userMessage(Locale.getDefault().getLanguage(), nCryptedData.getErrors())
.getErrorMessages());
}
cardDetails.setNumber(nCryptedData.getItems().get(0).getValue());
cardDetails.setCVN(nCryptedData.getItems().get(1).getValue());
com.eway.payment.sdk.data.beans.Customer customerEWAY = new com.eway.payment.sdk.data.beans.Customer();
customerEWAY.setFirstName(customer.getFirst_name1() + "");
customerEWAY.setLastName(customer.getLast_name1() + "");
customerEWAY.setEmail(customer.getEmail1());
customerEWAY.setMobile(customer.getMobile1());
customerEWAY.setPhone(customer.getPhone1());
customerEWAY.setCardDetails(cardDetails);
Address address = new Address();
address.setCity(customer.getCity());
address.setPostalCode(customer.getPostcode());
address.setState(customer.getState());
address.setStreet1(customer.getStreet_address());
customerEWAY.setAddress(address);
Payment payment = new Payment();
payment.setCurrencyCode("AUD");
int totalAmount = (int) (Float.parseFloat(paymentAmount) * 100);
payment.setTotalAmount(totalAmount);
payment.setInvoiceReference(UUID.randomUUID().toString());
payment.setInvoiceDescription(comment);
payment.setInvoiceNumber(invoice.getInvoice_number());
Transaction transaction = new Transaction();
transaction.setCustomer(customerEWAY);
transaction.setTransactionType(TransactionType.Purchase);
transaction.setPayment(payment);