Reply
Highlighted
Contributor
Posts: 22
Registered: ‎06-06-2016

Getting Error While Creating Customer Payment Profile

I am getting the error 

 

[code] => E00003
[text] => Name cannot begin with the '>' character, hexadecimal value 0x3E
. Line 2, position 269.

 

The Array that has been created :- 

 

$creditCard = new AnetAPI\CreditCardType();
$creditCard->setCardNumber("456456");
$creditCard->setExpirationDate("5566");
$creditCard->setCardCode("456");
$paymentCreditCard = new AnetAPI\PaymentType();
$paymentCreditCard->setCreditCard($creditCard);
//echo "<pre>";print_r($paymentCreditCard);exit;
// Create the Bill To info for new payment type
$phoneNumber = "123456";

$billto = new AnetAPI\CustomerAddressType();
$billto->setFirstName("Mrs Mary".$phoneNumber);
$billto->setLastName("Doe");
$billto->setCompany("My company");
$billto->setAddress("123 Main St.");
$billto->setCity("Bellevue");
$billto->setState("WA");
$billto->setZip("98004");
$billto->setPhoneNumber($phoneNumber);
$billto->setfaxNumber("999-999-9999");
$billto->setCountry("USA");
// Create a new Customer Payment Profile
$paymentprofile = new AnetAPI\CustomerPaymentProfileType();
$paymentprofile->setCustomerType('individual');
$paymentprofile->setBillTo($billto);
$paymentprofile->setPayment($paymentCreditCard);
$payment_response = $customer_profile->createCustomerPaymentProfile('40883515',$paymentprofile);

 

 

Highlighted
Contributor
Posts: 22
Registered: ‎06-06-2016

Re: Getting Error While Creating Customer Payment Profile

3D8Ewr249jD76Bt39jArx5C33D8Ewr24 3D8Ewr249jD76Bt39jArx5C340883515 3D8Ewr249jD76Bt39jArx5C340883515<><>Manal<>456<>456456<>5566<>individual

 

I dont know hwy I am getting "<>" in the post string ?