/** * @return string */ public function getBraintreeJsV2(CustomerInterface $customer, $formName = null) { if (is_null($formName)) { $_formName = $this->formType->getName(); } else { $_formName = $formName; } $script = "<script src=\"https://js.braintreegateway.com/v2/braintree.js\"></script>" . "<script>braintree.setup(\"" . $this->subscriptionAdapter->generateClientToken($customer) . "\", \"custom\", {id: \"" . $formName . "\"});" . "</script>"; return $script; }
/** * @depends testUpdateUser */ public function testDeleteUser($customer) { $customer = $this->adapter->deleteCustomer($customer); $this->assertFalse($customer->isSubscriptionSynced()); $this->assertNull($customer->getSubscriptionCustomerId()); return $customer; }