updateDetails() публичный статический Метод

public static updateDetails ( $transactionId, $attribs = [] )
Пример #1
0
 public function testUpdateDetails_withBadStatus()
 {
     $transaction = Braintree\Transaction::saleNoValidate(['amount' => '100.00', 'creditCard' => ['number' => '5105105105105100', 'expirationDate' => '05/12']]);
     $updateOptions = ['amount' => '90.00', 'orderId' => '123', 'descriptor' => ['name' => '123*123456789012345678', 'phone' => '3334445555', 'url' => 'ebay.com']];
     $result = Braintree\Transaction::updateDetails($transaction->id, $updateOptions);
     $this->assertFalse($result->success);
     $errors = $result->errors->forKey('transaction')->onAttribute('base');
     $this->assertEquals(Braintree\Error\Codes::TRANSACTION_CANNOT_UPDATE_DETAILS_NOT_SUBMITTED_FOR_SETTLEMENT, $errors[0]->code);
 }