BlueSnap API - VaultedShopper FirstName and LastName - bluesnap

I'm creating an integration for the BlueSnap payment API. I'm using the Hosted Payment Fields solution. So when I create a VaultedShopper I just supply the Hosted Payment Fields token. However, the other mandatory fields for the POST vaulted-shoppers call are FirstName and LastName.
If I supply FirstName and LastName, then the call works OK and the response includes the new ID - but with empty FirstName and LastName.
So I'm wondering what is the point of these fields?

If you provide first and last name in the request, they must be returned in the response. Keep in mind that JSON fields are case sensitive, so if you are sending "FirstName", the API will probably ignore it. Make sure you are sending "firstName" and "lastName".

Related

Purview API to show the contact names

I am only getting the Ids of contacts, owners, createdby and updatedby fields. Which API to use to get the corresponding names?
"contacts":{"Expert": [{"id": "aa874e20-85bd-4e63-a11d-ce715e2a85bb"}],"Steward": [{"id":aa874e20-85bd-4e63-a11d-ce715e2a85bb"}]}
i am only getting the Ids of contacts, owners, createdby and updatedby
fields. Which API to use to get the corresponding names?
Thank you #Sindhuja Laxmipuram posting your suggestion here as community wiki to beneficial for other community members for similar issue.
You can use the below command to list the contact or owner name for
the above.
GET {Endpoint}/catalog/api/atlas/v2/entity/guid/{guid}?minExtInfo={minExtInfo}&ignoreRelationships={ignoreRelationships}
For more information please refer this SO THREAD | How to use REST API to extract role assignment information from a Azure Purview account .

Smartsheet - Get id of the row creator

I need to get the creator id, but request with include=writerInfo returns only email. The problem is that the user email can be changed and createdBy will change but modifiedAt will not change. Thus, I will need to get a list of users each time to determine the createdBy id of the row.
Is there a way to get the createdBy id when receiving a sheet with rows?
According to what I'm seeing in the API docs, I don't believe it's possible to get userId at the row level in the results of a Get Sheet request.

Pre-populate cardholder name

I see it's possible to pre-populate email and shipping address fields, but I'd also like to pre-populate the cardholder name in the Square Checkout payment information section.
The name "Jane Doe" is put in there by default, but that name has some pretty negative connotations. I'd love to replace it with the customer's real name, which I can pass on through JSON.
Can it be done?

Loopback extending built in User model issues

I am inheriting the builtin User model in my own Customer model. The Customer model is having extra parameters like first-name, last-name etc. To create an User and Customer I am using the following code:
// create a Customer
User.create({
email: email,
password: userPassword,
cellnumber: cellDetails.cellnumber
},
function (error, userDet) {
I get an id in response to this call: 59c4c5845dc8de4730645963. But when I am trying to get the account by id i.e. accounts/{id} and pass it the above id, it gives the following error:
the "Unknown \"customer\" id \"59c4c5845dc8de4730645963\"."
So this means that id of the User model and Customer model are somehow not same. How do I resolve this ? Also, in the mongo db database all the properties are getting visible under the User model and not under the Customer model. What am I doing wrong here ? Could anyone let me know.
Thanks
I believe you should create like this: Account.create({ email, password, ... }) , using the Account model rather than User model.
You should use the model you created document with, Account in this case. The thing is, each model works only with it's own MongoDB collection and they are isolated from each other.

Get Username using GUID in Sugarcrm

I have an issue with my SugarCRM reset password page. When a user visits the Reset Password form through the link provided through mail, he/she has to put the username. If the username is kept empty the form gets submitted but the password doesn't change.
I want to either make username required field or fetch the username using GUID. Thanks.
$user = BeanFactory::getBean('Users',$guid);
$username = $user->user_name;
The guid included in the password reset link is not the guid for that user (that would be a security risk). Instead, it is a guid to the users_password_link table. If you are using the guid passed in from such a link, then you could find the username by the following SQL statement:
select users.user_name from users join users_password_link on users_password_link.username = users.user_name where users_password_link.id = '$guid';
If you were working with the user's actual guid, egg's answer is the correct way to find the information using SugarCRM's best practices.