square/square-php-sdk

How to change payment text "Custom Amount" in Square Payment API

Closed this issue · 9 comments

Is there a way to change the description for square to be something like Payment for Order xxxxx or Invoice xxxx?

http://prntscr.com/u9hpsx This is how it currently shows and this is very confusing for customer and admin to manage payments.

No Option to Change the text in create payment request.
https://github.com/square/square-php-sdk/blob/master/doc/models/create-payment-request.md

In order to have itemization detail, you would need to implement the Orders API, and pass the order_id to the CreatePayment request. It would show the items/taxes/etc instead of "Custom Amount" in that case.

Ok got it.
But Square API should have this feature.
So it can be used as a separate payment gateway.

What do you mean by Square API should have this feature? The Orders API is part of the Square API. Just want to make sure I'm understanding correctly.

What i mean is that we should have option to add payment itemization details without creating an order.

Like in my case we only use square Payment API to charge amount for a Woocommerce order but we don't have any item/order in square.
We just want to add that Order ID / Invoice ID as a details so user know for which order they paid. that's it

Apologies for the delay here @royrakesh. After coming back to it, you can change the text of "Custom Amount", so I might've been going down the wrong path. Whatever you pass as the "note" of the payment (ie the note parameter in CreatePayment), will show instead of "Custom Amount". Let me know if that helps.

NO it's not working.
Do I need to update the package version? | Currently using 5.0.0.20200528
This feature is added on the new version?

.....
 $body = new CreatePaymentRequest(
       $body_sourceId,
       $body_idempotencyKey,
       $body_amountMoney
   );
   $body->setAutocomplete(true);
   $body->setCustomerId($customer_id);
   $body->setLocationId(LOCATION_ID);
   $body->setReferenceId("Woocommerce Order ID: $order_id");
   $body->setNote("Deposit Payment for $order_id");
.....

The transaction list shows the note: http://prntscr.com/ur2d2j
But When I Open the Transection it Shows Custom Amount: http://prntscr.com/ur2f57
This is how the receipt looks like http://prntscr.com/ur2fz0

Ah interesting, I was mistaken then. I saw the transaction list and assumed it replaced the Custom Amount, my apologies. In this case, I'll leave this as an enhancement request, sorry for the confusion.

Thanks for confirming.
Hope this feature will be added in future updated.
Please keep this issue in the loop.

Closing this, as it's not an SDK request, it's an API request and needs to be done on the actual Payments API.