shippingSameAsBilling() public method

Set the shipping data fields to the same as billing data fields
public shippingSameAsBilling ( ) : Payment
return Payment
Example #1
0
 public function testShippingSameAsBilling()
 {
     $p = new Payment(new Authorize('API_LOGIN_ID', 'TRANS_KEY', Payment::TEST));
     $p->firstName = 'Test';
     $p->lastName = 'Smith';
     $p->company = 'Test Company';
     $p->address = '123 Main St.';
     $p->city = 'New Orleans';
     $p->state = 'LA';
     $p->zip = '70130';
     $p->country = 'US';
     $p->shippingSameAsBilling();
     $this->assertEquals('Test', $p->shipToFirstName);
     $this->assertEquals('Smith', $p->shipToLastName);
     $this->assertEquals('Test Company', $p->shipToCompany);
     $this->assertEquals('123 Main St.', $p->shipToAddress);
     $this->assertEquals('New Orleans', $p->shipToCity);
     $this->assertEquals('LA', $p->shipToState);
     $this->assertEquals('70130', $p->shipToZip);
     $this->assertEquals('US', $p->shipToCountry);
 }