public function testGetData() { $data = $this->request->getData(); $card = $this->getValidCard(); $this->assertEquals('12345', $data->profile->paymentProfiles->billTo->zip); $this->assertEquals($card['number'], $data->profile->paymentProfiles->payment->creditCard->cardNumber); $this->assertEquals('testMode', $data->validationMode); }
public function testGetDataShouldSetValidationModeToNoneIfNoCvvProvided() { unset($this->params['card']['cvv']); $this->request->initialize($this->params); $data = $this->request->getData(); $this->assertFalse(isset($data->profile->paymentProfiles->payment->creditCard->cardCode)); $this->assertEquals(CIMCreatePaymentProfileRequest::VALIDATION_MODE_NONE, $this->request->getValidationMode()); }