Open alanburke opened 6 years ago
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'));
@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.
Perhaps I'm mistaken, but it doesn't seem possible to set Customer Name on a HppRequest object?