{"action":"closed","issue":{"url":"https://api.github.com/repos/braintree/braintree_php/issues/67","labels_url":"https://api.github.com/repos/braintree/braintree_php/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/braintree/braintree_php/issues/67/comments","events_url":"https://api.github.com/repos/braintree/braintree_php/issues/67/events","html_url":"https://github.com/braintree/braintree_php/issues/67","id":67644174,"number":67,"title":"PaymentMethod::Create() does not take raw credit card fields","user":{"login":"kevinkyao","id":11890550,"avatar_url":"https://avatars.githubusercontent.com/u/11890550?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinkyao","html_url":"https://github.com/kevinkyao","followers_url":"https://api.github.com/users/kevinkyao/followers","following_url":"https://api.github.com/users/kevinkyao/following{/other_user}","gists_url":"https://api.github.com/users/kevinkyao/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinkyao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinkyao/subscriptions","organizations_url":"https://api.github.com/users/kevinkyao/orgs","repos_url":"https://api.github.com/users/kevinkyao/repos","events_url":"https://api.github.com/users/kevinkyao/events{/privacy}","received_events_url":"https://api.github.com/users/kevinkyao/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-10T17:31:52Z","updated_at":"2015-05-19T20:22:00Z","closed_at":"2015-05-19T20:22:00Z","body":"According to the docs, the PaymentMethod::Create() API call should support taking raw credit card fields (number, cvv, etc.)\r\nhttps://developers.braintreepayments.com/javascript+php/reference/request/payment-method/create\r\n\r\nHowever, the PHP SDK doesn't actually allow it:\r\nhttps://github.com/braintree/braintree_php/blob/master/lib/Braintree/PaymentMethodGateway.php#L102\r\n\r\n```php\r\n private static function baseSignature($options)\r\n{\r\n$billingAddressSignature = Braintree_AddressGateway::createSignature();\r\nreturn array(\r\n'customerId',\r\n'paymentMethodNonce',\r\n'token',\r\n'billingAddressId',\r\n'deviceData',\r\narray('options' => $options),\r\narray('billingAddress' => $billingAddressSignature)\r\n);\r\n}\r\npublic static function createSignature()\r\n{\r\n$options = array(\r\n'makeDefault',\r\n'verifyCard',\r\n'failOnDuplicatePaymentMethod',\r\n'verificationMerchantAccountId'\r\n);\r\n$signature = self::baseSignature($options);\r\nreturn $signature;\r\n}\r\n```\r\n"}}