{"action":"created","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/issues/158","repository_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/issues/158/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/issues/158/events","html_url":"https://github.com/silverstripe/silverstripe-omnipay/issues/158","id":207469167,"number":158,"title":"PxPay Card Tokens","user":{"login":"mattsagen","id":7367144,"avatar_url":"https://avatars.githubusercontent.com/u/7367144?v=3","gravatar_id":"","url":"https://api.github.com/users/mattsagen","html_url":"https://github.com/mattsagen","followers_url":"https://api.github.com/users/mattsagen/followers","following_url":"https://api.github.com/users/mattsagen/following{/other_user}","gists_url":"https://api.github.com/users/mattsagen/gists{/gist_id}","starred_url":"https://api.github.com/users/mattsagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattsagen/subscriptions","organizations_url":"https://api.github.com/users/mattsagen/orgs","repos_url":"https://api.github.com/users/mattsagen/repos","events_url":"https://api.github.com/users/mattsagen/events{/privacy}","received_events_url":"https://api.github.com/users/mattsagen/received_events","type":"User","site_admin":false},"labels":[{"id":542834539,"url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/labels/gateway-specific","name":"gateway-specific","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-02-14T10:01:57Z","updated_at":"2017-02-28T07:19:30Z","closed_at":null,"body":"Hi there, thx for the awesome work.  I am trying to use PaymentExpress_PxPay to store cards in offsite hosted gateway.  I am not sure how to do this through the Silverstripe Wrapper as I can't find an example?\r\n\r\nBut before I spend time on it, I just want to be sure that after we have created a card through PxPay during a purchase, we can provide the amount, currency, and token via PxPay and not redirect the customer to the offsite gateway.  It seems obvious that this is how it would work, otherwise tokens aren't much use (we are using for subscriptions and one-click purchases) but I want to make sure.\r\n\r\nIf this is correct use case, then could someone provide an example of create card call from within a SS Controller?  I'm thinking that I might have to do away with the wrapper and just use the raw Omnipay classes like https://github.com/thephpleague/omnipay-paymentexpress/issues/1 but would rather have handy SS integration...\r\n\r\nAfter succesfully doing normal test purchases I tried adding the EnableAddBillCard with a BillingID, then changing the transaction number, removing EnableAddBillCard, and trying again, but no luck.\r\n \r\n`$payment = Payment::create()\r\n\t\t    ->init(\"PaymentExpress_PxPay\", 100, \"NZD\")\r\n\t\t    ->setSuccessUrl($this->Link().\"/success\")\r\n\t\t    ->setFailureUrl($this->Link().\"/cancelled\");\r\n\t\t// Save it to the database to generate an ID\r\n\t\t$payment->write();\r\n\t\t$data = ['transactionId' => '125f8s3d','EnableAddBillCard' => 1,'BillingID' => 'xyz555'];\r\n\t\t$response = ServiceFactory::create()\r\n\t\t    ->getService($payment, ServiceFactory::INTENT_PURCHASE)\r\n\t\t    ->initiate($data);\r\n\t\treturn $response->redirectOrRespond();`"},"comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/issues/comments/282962139","html_url":"https://github.com/silverstripe/silverstripe-omnipay/issues/158#issuecomment-282962139","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/issues/158","id":282962139,"user":{"login":"bummzack","id":1006185,"avatar_url":"https://avatars.githubusercontent.com/u/1006185?v=3","gravatar_id":"","url":"https://api.github.com/users/bummzack","html_url":"https://github.com/bummzack","followers_url":"https://api.github.com/users/bummzack/followers","following_url":"https://api.github.com/users/bummzack/following{/other_user}","gists_url":"https://api.github.com/users/bummzack/gists{/gist_id}","starred_url":"https://api.github.com/users/bummzack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bummzack/subscriptions","organizations_url":"https://api.github.com/users/bummzack/orgs","repos_url":"https://api.github.com/users/bummzack/repos","events_url":"https://api.github.com/users/bummzack/events{/privacy}","received_events_url":"https://api.github.com/users/bummzack/received_events","type":"User","site_admin":false},"created_at":"2017-02-28T07:19:30Z","updated_at":"2017-02-28T07:19:30Z","body":"Wait… aren't you working with @cjsewell? He just implemented `createCard`, see #161.\r\n\r\nThe extension should be added to `Payment` and yes, `onCancelled` should work (when the payment was cancelled on the external payment form)."}}
{"actor":{"display_login":"bummzack"}}