Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Customer Name #13

Open
alanburke opened this issue Feb 26, 2018 · 2 comments
Open

Setting Customer Name #13

alanburke opened this issue Feb 26, 2018 · 2 comments

Comments

@alanburke
Copy link

Perhaps I'm mistaken, but it doesn't seem possible to set Customer Name on a HppRequest object?

@oliverfrodrigues
Copy link

oliverfrodrigues commented Jul 1, 2018

Hello, did you ever got this sorted ? I need to pass Customer Name / Variable Ref / Product ID / Comment 1 and 2

EDIT: just got it working (except for Prod ID, I will raise another issue for that)

$hppRequest = (new HppRequest())
->addMerchantId($merchantId)
->addAccount("internet")
->addAmount($amount * 100) // realex takes the amount with no decimals
->addCurrency($currencyId)
->addAutoSettleFlag(TRUE)
->addSupplementaryData($supData)
->addCustomerNumber($MembershipNumber)
->addShippingCountry($CountryId)
->addBillingCountry($CountryId)
->addCommentOne($EmailAddress)
->addCommentTwo($CustomerName)
->addVariableReference($InvoiceId)
->addTimeStamp(date('YmdHis'));

@rxp-developers
Copy link
Contributor

rxp-developers commented Jul 2, 2018

@alanburke, @oliverfrodrigues

The customer's first and last name can be added using Supplementary Data.

$supplementaryData = array("HPP_CUSTOMER_FIRSTNAME" => "James", "HPP_CUSTOMER_LASTNAME" => "Mason"); $hppRequest->addSupplementaryData($supplementaryData);

For Variable Ref, Product ID and Comment 1 & 2 the request object has methods required for all of those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants