question

Sukhbir Singh avatar image
Sukhbir Singh asked Jacob Abrams commented

Urgent: Payment connector sale response "externalReferenceId" field has null value

Hi @David Marginian @Greg,


We are using Payment connector to make the Sale payment transaction via the following code:


SaleRequest request = new SaleRequest();

request.setAmount(paymentAmount);

request.setExternalId(ExternalIdUtils.generateNewID()); //value returns in externalPaymentId

request.setOrderId(mOrder.getId());

request.setCardEntryMethods(Intents.CARD_ENTRY_METHOD_ALL);

request.setDisablePrinting(true);

request.setDisableReceiptSelection(true);

request.setDisableDuplicateChecking(true);

request.setTipAmount(getAmountInLong(DEFAULT_TIP));

request.setAllowOfflinePayment(false);

request.setTipMode(TipMode.TIP_PROVIDED);

Map<String, String> extraParam = new HashMap<>();

extraParam.put(Intents.EXTRA_EXTERNAL_REFERENCE_ID, "11111111");

request.setExtras(extraParam);

request.setRequestId("11111111");

paymentConnector.sale(request);


In the SaleResponse we are getting null value for “externalReferenceId” while we are sending the value for it in the SaleRequest with extras.


Can you please suggest a way to find the value in “externalReferenceId” field in the response of payment transactions by using a payment connector?

Also, explain the use of request Id during the transaction. We are sending it with the request but not getting it in the response.


Note: We can get the value for “externalReferenceId” in the response if we will use Intents.ACTION_SECURE_PAY with Intents.EXTRA_EXTERNAL_REFERENCE_ID to make the payment but clover is recommending the Payment connector to make the payment.


Thanks.

semi-integrationsPaymentConnectorSale
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

The main difference between payment connector and Intents.ACTION_SECURE_PAY is that payment connector will detect tethered setups (such as Clover Station 2018 USB tethered to Clover Mini) and present the payment screen on the preferred device automatically. Intents.ACTION_SECURE_PAY presents the payment on the the local device and ignores tethered devices.

0 Likes 0 ·

1 Answer

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

The correct way to do this would be to use setExternalReferenceId on the request. However, it looks like we haven't released a version of Payment Connector that has this capability. If you require this you will either have to wait until we do or fire raw intents.

4 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sukhbir Singh avatar image Sukhbir Singh commented ·

Hi @David Marginian,

Thanks for your quick response.

Sale Request does not have a method like setExternalReferenceId. Can we use raw intent (Intents.ACTION_SECURE_PAY) for the payment?

Also please suggest how can we do Sale type transaction using the same intent?

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ Sukhbir Singh commented ·

Yes, if you need to have the externalReferenceId then the only option is for you to wait until we release a new version of Payment Connector (no ETA, may be awhile) or fire raw intents. I am not an expert and what needs to be done to fire raw intents so I can't currently advise you on the details of doing so.

0 Likes 0 ·
Sukhbir Singh avatar image Sukhbir Singh David Marginian ♦♦ commented ·

OK, @David Marginian Thanks for your response.

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community