Create address
Customer
objects can have Address
objects associated with them for later use when creating a Transaction
.
Create address for a Customer
You can create an Address implicity when creating a Transaction, or directly as shown below.
$addressReq = Pencepay_Request_Address::build()
->company("Widgets Ltd")
->firstName("John")
->lastName("Hancock")
->addressLine1("Street 123")
->addressLine2("")
->city("Zagreb")
->postalCode("10000")
->countryCode("HR")
->customData(array('my' => 'value'));
$address = Pencepay_Address::create("customer_uid", $addressReq);
Result
Address
object is returned on success.