From 476cb08a79b6bacd881c6cf0315853a23341d3b9 Mon Sep 17 00:00:00 2001 From: Adam Mueller Date: Fri, 2 Sep 2016 13:49:56 -0700 Subject: [PATCH] Add support for refunding payments --- .../solidus_paypal_braintree/gateway.rb | 10 +- .../cassettes/braintree/authorize.yml | 78 ++--- spec/fixtures/cassettes/braintree/credit.yml | 302 ++++++++++++++++++ spec/fixtures/cassettes/braintree/payment.yml | 82 ++--- .../fixtures/cassettes/braintree/purchase.yml | 82 ++--- spec/fixtures/cassettes/braintree/token.yml | 62 ++-- spec/fixtures/cassettes/braintree/void.yml | 158 ++++----- .../solidus_paypal_braintree/gateway_spec.rb | 108 ++++--- 8 files changed, 608 insertions(+), 274 deletions(-) create mode 100644 spec/fixtures/cassettes/braintree/credit.yml diff --git a/app/models/solidus_paypal_braintree/gateway.rb b/app/models/solidus_paypal_braintree/gateway.rb index 4bbbb874b1c..e9684c36561 100644 --- a/app/models/solidus_paypal_braintree/gateway.rb +++ b/app/models/solidus_paypal_braintree/gateway.rb @@ -54,9 +54,15 @@ def capture(_money, _source, _gateway_options) raise NotImplementedError end + # Used to refeund a customer for an already settled transaction. + # + # @api public + # @param money [#to_s] amount to refund + # @param response_code [String] the transaction is of the payment to refund # @return [Response] - def credit(_money, _source, _response_code, _gateway_options) - raise NotImplementedError + def credit(money, _source, response_code, _gateway_options) + result = Braintree::Transaction.refund(response_code, money) + Response.build(result) end # Used to cancel a transaction before it is settled. diff --git a/spec/fixtures/cassettes/braintree/authorize.yml b/spec/fixtures/cassettes/braintree/authorize.yml index f0c7402ac80..92bc4c17dce 100644 --- a/spec/fixtures/cassettes/braintree/authorize.yml +++ b/spec/fixtures/cassettes/braintree/authorize.yml @@ -34,7 +34,7 @@ http_interactions: message: Created headers: Date: - - Fri, 02 Sep 2016 22:11:11 GMT + - Fri, 02 Sep 2016 22:37:08 GMT Content-Type: - application/xml; charset=utf-8 Transfer-Encoding: @@ -55,52 +55,52 @@ http_interactions: Content-Encoding: - gzip Etag: - - W/"8d93c049b9f16c9ffe371fbab80201f9" + - W/"a85394242d425cac7884c1f46aee6514" Cache-Control: - max-age=0, private, must-revalidate X-Request-Id: - - eb613b0b-b8c5-4d6d-ab8e-2c1354b040bf + - bd7d3219-5e82-4d47-ad73-ee20429ae9a7 X-Runtime: - - '0.451787' + - '0.346961' Strict-Transport-Security: - max-age=31536000; includeSubDomains body: encoding: ASCII-8BIT string: !binary |- - H4sIAP/4yVcAA+xYS2/jNhC+768IfGfkVxJnoWgfSFqk2EPR3RzaS0CJY4sN - Raok5dj99R2KkixF1CYF9tBDgRyimY9DzoMzHx1/OBTibA/acCVvZovz+ewM - ZKYYl7ub2cO3n8hm9iF5F1tNpaGZRVTy7uws5izZPl1dLS4vn+IIP5zMWGor - k9DK5krzv4HFUSNyWnssITFUQBzV/zpZVmmNux0JN4rgppA8fL2No7HYgWmh - KmmTxfx8Po+j5sspCtBZTqUlNMuckOB5jIUiVcLGUUhbn7ZKSUB3Jrm4mVld - wSzy1ina0m+CKs0QGVBkGqgFRqg9c77fzBh+Wl7ALFnOF5dkfk3my2/L5fvF - Av/+wAh0C+r1Vcn+3frTgibOxir0wH345F3MF5vlanPRJg+lW66NJZIW8PL8 - qBR0WpepoqTyGNBAQbkIyJ8hNdyGbJW5kiH5lh5GUY36bsUpFwKLtnMxZOTH - e2isBsCiYEyDMaEQHCxI5lIxCREqo4LbkHkNO7xxoTgpvFqivhzB82KF6uO0 - O17tVhMqypwu34RavYaSFWaDZ+NM9ZKDPm0ryULXpNOYpsyp1vQ4UGIge60o - ZKSk2nIMjQFrBRSAV3W4ImT81LNeM98zm1Kb5UFMzsvy/1r8j9ZiPztNZyRb - DoKZphb2hoDWShOMUamkgaBrNa7n+hCd3OOI+i6gNTHMWtjKdzG1G/v9eOVY - 6KA7HAzP9IiaP8FXOc4aM05sXGqV4W4Yh/Z20BoeDMYJPNxxMXfDeko7sdJi - oSafStTsHYmYQtQRZIy7U2GMx7DRKfeKZy4PW8wvrsASSUGPfancqMdd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A//8DANMsoGFJFQAA http_version: - recorded_at: Fri, 02 Sep 2016 22:11:50 GMT + recorded_at: Fri, 02 Sep 2016 22:37:08 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/cassettes/braintree/credit.yml b/spec/fixtures/cassettes/braintree/credit.yml new file mode 100644 index 00000000000..8ac371ff039 --- /dev/null +++ b/spec/fixtures/cassettes/braintree/credit.yml @@ -0,0 +1,302 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.sandbox.braintreegateway.com/merchants/7rdg92j7bm7fk5h3/transactions + body: + encoding: UTF-8 + string: | + + + 40 + fake-paypal-future-nonce + + true + + sale + + headers: + Accept-Encoding: + - gzip + Accept: + - application/xml + User-Agent: + - Braintree Ruby Gem 2.66.0 + X-Apiversion: + - '4' + Authorization: + - Basic bXdqa2t4d2NwMzJja2huZjphOTI5OGY0M2IzMGM2OTlkYjMwNzJjYzRhMDBmN2Y0OQ== + Content-Type: + - application/xml + response: + status: + code: 201 + message: Created + headers: + Date: + - Fri, 02 Sep 2016 22:42:45 GMT + Content-Type: + - application/xml; charset=utf-8 + Transfer-Encoding: + - chunked + X-Frame-Options: + - SAMEORIGIN + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Authentication: + - basic_auth + X-User: + - 3v249hqtptsg744y + Vary: + - Accept-Encoding + Content-Encoding: + - gzip + Etag: + - W/"f3a1560798cb24a66ef4e5e73eea1972" + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - b4f790dd-b5cb-43b8-82a7-6e27632636e3 + X-Runtime: + - '0.379835' + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAGUAylcAA+xYS3PbNhC+51d4dIcpyZJlZWgmTuxm3PEhk8SH9uIBiaWI + mgRYAJSl/vou+KYJxu5M28lMO+ODtfvhsQ/sfkv/3SFLT/agNJficrY4nc9O + QESScbG7nN1/+4lczN4Fb3yjqNA0MogK3p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R + 4FhqR4/JPk0QmSSaPU48mVZfU7/hk6kHD5JwTEF1HHT4tjuWCMCN6sDYd4YU + GhVZ/kpa3eLbHeoBpyMQ/ZmnREyNLZWHNNLXNrPfN1OLzW0k8bph7PaqPV6i + JZYoCGjO8UpjeWWwN7b4H3YCTlQZN5jHD7FUDx1T+i+7xDEJ/1guaCX126la + YErd7LcIdaR4PsmOe/q2ZZXUn+TIxiQjSECJ9aazuQ2QeC1lnFi88rNzLA8g + 2PId1J5xXVYxpw6qXWTTwiZ60tRUii1kfLfhpkib7dcMtGuisLX6igokVAgY + 74ox31vuEgNMsQ57rHwiVTRHWnRDWChdTS4MDA7muulPA5U7Nr2xx338EDP6 + gPNKOBysA7A5K/c17AiImYpk3bVhEUWOqQYjMmG7tTwvDLhSoyYWhAsk30U1 + RtqvVijPafpQfwTyvSnckNr2bB0y4NUzfjwJfHm/khN/lAIny2xImyfRJVlN + sMQQfG42DwHtiKVjprZGv8BNEYRNvvzkE5T/v4cDVsQUqrLVV7cLKtex4PPV + L4RdwNkG54X1Oo7oekOjzcV2vjrb9Hzc8IrhQILir1d3N2S7YTFdnm9jNqcR + Ywssq89xfxfFrBzyeoaJdLDY2Qtc33y4/0TOLhbbsy3drLdLVnLFStn5EcjU + p7P+wDoZhMqjN18ebq/JcnNON6vN+WK7Xl2sN/MmEoPzFOm+RwQ/y0Q0qJ64 + j24/UATXEhpsJ2weeJqiGPPQ1JNm3QNv7m4/3X64u8E6PgVppoXclEnJgo9X + n7/df7lBi5D8deLm08TEJ6VnHbKrngH23cWwTfaU7pUTH6tfhjU50LascYlq + Xthgu+DNnwAAAP//AwC5j9scnBcAAA== + http_version: + recorded_at: Fri, 02 Sep 2016 22:42:45 GMT +- request: + method: put + uri: https://api.sandbox.braintreegateway.com/merchants/7rdg92j7bm7fk5h3/transactions/hfrvwgtm/settle + body: + encoding: UTF-8 + string: '' + headers: + Accept-Encoding: + - gzip + Accept: + - application/xml + User-Agent: + - Braintree Ruby Gem 2.66.0 + X-Apiversion: + - '4' + Authorization: + - Basic bXdqa2t4d2NwMzJja2huZjphOTI5OGY0M2IzMGM2OTlkYjMwNzJjYzRhMDBmN2Y0OQ== + Content-Type: + - application/xml + response: + status: + code: 200 + message: OK + headers: + Date: + - Fri, 02 Sep 2016 22:42:47 GMT + Content-Type: + - application/xml; charset=utf-8 + Transfer-Encoding: + - chunked + X-Frame-Options: + - SAMEORIGIN + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Authentication: + - basic_auth + X-User: + - 3v249hqtptsg744y + Vary: + - Accept-Encoding + Content-Encoding: + - gzip + Etag: + - W/"e3649378352bf711b686c7884dba68f5" + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 4216fe7e-f24c-4898-8282-312772929373 + X-Runtime: + - '1.692917' + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAGcAylcAA+xYS3PbNhC+51d4dIcpyZZlZWQmTuxm3Mkhk8SH9qKBiKWI + GgRYAJSl/Pou+KYJxm6n7XTazugg7n5YYBf7xPrNIRUne9CGK3k1mZ1OJycg + I8W43F1N7r/+QC4nb8JXa6upNDSyiApfnZysOQuTWO8fdzZdB/jhaMZSm5vQ + gLUC2Dqovh3LHjMIDRWwDoq/jhblWuNWR8KNIrgjhPdfbtbBkOzANFW5tOH5 + 9HQ6XQfVl2OkoKOESktoFDkiwcMYC+lWCbsOfNziqPmWeHgnkouridU5TIJS + OkVZ+kVQpRkiPYxIA7XACLUnTverCcNPy1OYhPPp7IJMV2Q6/zqfvz7H3+Jn + tECzoFifZ+zl6y9wfbugsrOxCjVwH8XNPT0hEmOujSWSpuBhCjrOi1SaUXn0 + cCClXHjoj7A13PpkZYmSPnpMDwOjBl2t1lsuBDrs36yhsRoAfYIxDcb4THCw + IJm7iVGIUBEV3PrEa9hhtPnspDCyRBEb3vOig+rjuDol260mVGQJnb8IdfYc + SuZ4Gzwa3lTnclC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w83D + 6Kk4mvgE5lHkmeHwRkZ0d5pnuQWfa1RtFOESR428nKndEx7SMyo21YvYOhjD + 9Rv5jq79fv/8yTQwCnxeXjEBvFcS5+i0PySMoovWPMGESjDcnB8C6hErzwOD + U/qZThxB2NIU719h8f8tHDD5CSiTdJfdLChNx8JP1z8RdglnS5yOFos4oosl + jZaXq+n52bJj47qL6o9fSP5y/fGWrJYspvOLVcymNGJshin0Ke7PaqhLg7y8 + n8bmN9+5A9zcvrv/QM4uZ6uzFV0uVnNWdMYls7UjkLF3xO54PnoJpUVvP2/u + bsh8eUGX58uL2WpxfrlYTuub6O2nSfv6Ev6oElmjOuQuunmOCW8U1NiWWAe4 + EEhGP7TVXF3Vu9uPdx/u3n28de9FI5B6Nsps4ZQsfH/96ev951vUCFvdllw/ + xIy8rz0pj232DLHGzvplssP0rxx5uX8eVvtAU7KGKaqOsJ648NVvAAAA//8D + AFgau56oGAAA + http_version: + recorded_at: Fri, 02 Sep 2016 22:42:47 GMT +- request: + method: post + uri: https://api.sandbox.braintreegateway.com/merchants/7rdg92j7bm7fk5h3/transactions/hfrvwgtm/refund + body: + encoding: UTF-8 + string: | + + + 20 + + headers: + Accept-Encoding: + - gzip + Accept: + - application/xml + User-Agent: + - Braintree Ruby Gem 2.66.0 + X-Apiversion: + - '4' + Authorization: + - Basic bXdqa2t4d2NwMzJja2huZjphOTI5OGY0M2IzMGM2OTlkYjMwNzJjYzRhMDBmN2Y0OQ== + Content-Type: + - application/xml + response: + status: + code: 201 + message: Created + headers: + Date: + - Fri, 02 Sep 2016 22:42:47 GMT + Content-Type: + - application/xml; charset=utf-8 + Transfer-Encoding: + - chunked + X-Frame-Options: + - SAMEORIGIN + - SAMEORIGIN + X-Xss-Protection: + - 1; mode=block + X-Content-Type-Options: + - nosniff + X-Authentication: + - basic_auth + X-User: + - 3v249hqtptsg744y + Vary: + - Accept-Encoding + Content-Encoding: + - gzip + Etag: + - W/"1c5337e012846cb439b5755f7a2b55e0" + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 5163c0e9-aca2-435c-992e-765e44877f92 + X-Runtime: + - '0.309892' + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAGcAylcAA+xYS2/bRhC++1cYuq8py3JkBzTzshOkCAojjQ/txVhyR+LW + 5C67D1nqr+/s8iEyXCYqihY5FPDBmvn2MbPz+Ibxq11ZnG5BaS7Fzez8bD47 + BZFJxsXmZvbw5T25mr1KTmKjqNA0M4hKTk5PY86SpdCm2qXLOMIfTqYNNVYn + GowpcHkcNQKnM/sKkkwB4yaO/A8nzaxSeNqecC0JHgrJwy+3cTQWOzAtpRUm + WczP5vM4an45RQkqy6kwhGaZExK8jzZQprLAw0Jaf1ubkoDuVPDiZmaUhVlU + 705xL3UUVCqGyIACDacGGKHm1Nl+M2P40/ASZmjO+QsyvybzxZfF4uUS/1a/ + oQe6BX69rdjfW39Y0PhZG4kWuB/+8b6+IQrXXGlDBC0hoCzotC6TZUXFPqCB + kvIiIH+GVHMT2qvKpQjJ13Q3cmrUtypOeeGC7j+2UBsFgDHBmAKtQy7YGRDM + vcQkpJAZLbgJba9ggwkX8pPE3Cp8bgTviwGq9tPm1Gq3mtCiyuniKNTF91DC + 4mvwbPxSvcdBm9ZWsFCWdBrdRDlViu4HSnRkrxK5VM7Xavu8MWUcTSHc6ooq + w9FhvjZBCZi/Q1ToSGpNLhX/c7Tl6Oa9bVNqsjyIyXlV/R+hP2iE9l+nKZdk + zaFguomFrSaglFQEfVRJoSFomsf1TB+ikzfYt74JaLcYvlp4l29ivBnb7Xjl + WOigG+wWz3SPmt+hjnJsQHr8sHGlZIanoR/a7KAeHnTGATw88Xw+X8TRlHZi + pcFATe5rObDgcg/xLmTIM/Ba6OQxbHTNreSZe4g1PjCuwBhJQY2NsY4A4Cl1 + l59AGbojNTUJqmAHZdU28VTKAqiYJWtaaEBa1AFa0oBWkIwq1oSykU8QyrWU + h6S+XixDGYE7EneFYDW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bj6NJJ/v + 3j/8fOtRB+HJqPVNl8oA8JiC1RbxAIGPozZFBm02OfkLAAD//wMAyqX9QF0W + AAA= + http_version: + recorded_at: Fri, 02 Sep 2016 22:42:47 GMT +recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/cassettes/braintree/payment.yml b/spec/fixtures/cassettes/braintree/payment.yml index e5fb5f47293..3d2397f741d 100644 --- a/spec/fixtures/cassettes/braintree/payment.yml +++ b/spec/fixtures/cassettes/braintree/payment.yml @@ -35,7 +35,7 @@ http_interactions: message: Created headers: Date: - - Fri, 02 Sep 2016 22:11:10 GMT + - Fri, 02 Sep 2016 22:36:03 GMT Content-Type: - application/xml; charset=utf-8 Transfer-Encoding: @@ -56,54 +56,54 @@ http_interactions: Content-Encoding: - gzip Etag: - - W/"550fbc6fe40cfa602d6b2104f9465dec" + - W/"1fca2063410b600590b2ad423e4ed3c9" Cache-Control: - max-age=0, private, must-revalidate X-Request-Id: - - 849aab8d-5be2-43c8-b7a9-9959b01fa584 + - f311b38c-7db3-4213-b2b8-cf0c0dc98643 X-Runtime: - - '0.510242' + - '0.430471' Strict-Transport-Security: - max-age=31536000; includeSubDomains body: encoding: ASCII-8BIT string: !binary |- - H4sIAP74yVcAA+xYS3PbNhC++1d4dIdJybYkZ2g6Tuxm3PEhk8SH9uIByaWI - mgRYAJSl/vouCJIiTTB2Z9KZzLQ3affDYx/Y/ZbB1a7Ij7cgFRP8cjY/8WfH - wGORML65nD18+4WsZ1fhUaAl5YrGGlHh0fFxwJIwejrdcDiVgYd/jExpqisV - KtA6x+WB1wiMTu9LCBXNIfDqn0YWV1LiWXvClCB4JIQPX28Cbyw2YFqIiuvw - /Nz3T3w/8Jr/RlWAjDPKNaFxbIQE76M0FJHIdeC5tPVtq4g4dMec5ZczLSuY - eXZ3invJN0GFTBDpUMQSqIaEUH1srL+cJfhXswJm4cKfL4l/QfzFt8Xi3Xz+ - bu7/jj7oFtTrqzL5Z+sPCxpPKy3QAvPHBm+x8P35xdxvg4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45CcILEa0ntxOKVT84xfIBg63dQ/JipqpY5dWB3EU0jG+lM + Y9MpNpLh3fqbIn02HzbQrpHy1uotJUgp5zDcFWO+MxwmARhjH+ZY8URsNAda + dENYSmUnmBg0Duiq6VI9lTs2nfHHfXwfM/iW80I47I0DsEVL9zXMKIiZiqTd + tWEZRY7pBiMyYruxvCg1uFKjpheEcSThpR0nzQcslBc0e6i/Bm28MVyf4nZs + 7TPhxQlPHgU+v1/Fjd8LjhNm3qfPo+iKtKZYYgg+N5OHgHYkwjFbG6Of5agI + w2ZfffwJqt9vYY9VMQNbuLrqdoF1Xhx8uv6DLNeLJY0uljP/YnYxny0u5uv1 + ZTj3O15u+EV/NEHxl+uPt8SPFtPlPPHjZJXMo/UaC+sp7mdRTeuSlzNNpIXl + 1lzg5vbd/Qfi+7CMkssVLC+XFWe0yqMfgYx9ROuOrq5aVXnZevT288PdDVlE + 8WwVLhJYzabh5XzVRKJ3niTHLxPB7yLlDaoj7qLbTxXBjYAGexQ2TzzLUIyZ + qOuZs+6Dtx/vPty9+3iLlXwM0kwNha7SMg7eX3/6ev/5Fi1CEngUNx8pRj4u + nfTIY/0MsPNO+42yo3SvHPly/TysyYG2aQ2LVPPGetsFr/4GAAD//wMA6r76 + k6kXAAA= http_version: - recorded_at: Fri, 02 Sep 2016 22:11:49 GMT + recorded_at: Fri, 02 Sep 2016 22:36:03 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/cassettes/braintree/purchase.yml b/spec/fixtures/cassettes/braintree/purchase.yml index 8dc14152890..9492cc039d8 100644 --- a/spec/fixtures/cassettes/braintree/purchase.yml +++ b/spec/fixtures/cassettes/braintree/purchase.yml @@ -35,7 +35,7 @@ http_interactions: message: Created headers: Date: - - Fri, 02 Sep 2016 22:11:09 GMT + - Fri, 02 Sep 2016 22:36:05 GMT Content-Type: - application/xml; charset=utf-8 Transfer-Encoding: @@ -56,54 +56,54 @@ http_interactions: Content-Encoding: - gzip Etag: - - W/"c08f682cf483be66d923408916993638" + - W/"5818840e848777fb85174c5d4be0db9f" Cache-Control: - max-age=0, private, must-revalidate X-Request-Id: - - 5f23169e-faf0-4b4c-9496-4846a968097a + - 4afef4aa-3a2b-4605-8d99-f2220a0e86c0 X-Runtime: - - '0.647860' + - '0.530645' Strict-Transport-Security: - max-age=31536000; includeSubDomains body: encoding: ASCII-8BIT string: !binary |- - H4sIAP34yVcAA+xYS2/bOBC+91cEvjOyHMdJCkdp2mSLLHoo2uSwewkocWyx - kUiVpBy7v36HoiRLFtXk0AUK7N7smY+PeXDmGy2vtnl2tAGluRSXk/B4OjkC - kUjGxfpy8nD/BzmfXEVvlkZRoWliEBW9OTpachY9PdFtsruAZYB/rEwbakod - aTAmw+XLoBZYndkVEGmaIbr6aWVJqRSetSNcS4JHQvTw9WYZDMUWTHNZChOF - 0+PpdBnU/6wiB5WkVBhCk8QKCd5GG8hjmZll4NNWdy1j4tEdCZ5dTowqYRK4 - 3SnupV4FlYoh0qNIFFADjFBzZG2/nDD8a3gOk2g2DRdkekGms/vZ7G0Yvp2e - /40eaBdU68uCvX79Ba7fL6j9rI1EC+wfF7owXJxenE7PmtChdMWVNkTQHA7v - j8qMjusSmRdU7DwayCnPPPJniDU3vr2KVAqffEW3A68GXbOWMc9szrUm+jb5 - 9RZqowAwKRhToLXPBVsDgtlQjEIymdCMG9/2Ctb43nx+kvi0supxeO+LGap2 - 4+Y4tV1NaFakdPYq1MlLKFFiNHgyjFQnOGjTqhTM90xaja7TnCpFdz0lOrJT - iHybFFQZjq6pihDkgE+1v8K3OS1NKhX/8fL2nW1japLUi0l5Ufyfi79pLnaj - U1dGsuKQMV3nwkYTUEoqgj4qpNDgNa3CdUzvo6M7bFE/BTRb9KPm3+WnmMqM - zWa4cii00DU2hme6Q803cFmOvUYPA7sslEzwNPRD8zpoBfc6Yw/unxhObbMe - 046sNJio0XWBmg0w7+oKUXmQMW5vhT4ewga33Eie2DisML64AlMkBjW0pbSt - Hk9x/XwEZeiWOBLiVcEW8qJp17GU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LuT+f + XfhLP5rGyZI2keidJ8nxm0Twp0h5g+qIu+j2I0VwLaDBHoXNE88yFGMm6nra + rLvgzYfb97dvP9xgJR+DNPNCoau0jIN3Vx+/3H26QYuQ/h3FzeeJkc9KJz3y + WD8D7LzTfqPsKN0rR75YPw1rcqBtWsMi1byx3nbBix8AAAD//wMA7brPu6EX + AAA= http_version: - recorded_at: Fri, 02 Sep 2016 22:11:47 GMT + recorded_at: Fri, 02 Sep 2016 22:36:05 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/cassettes/braintree/token.yml b/spec/fixtures/cassettes/braintree/token.yml index a459ab0df7e..fac358cee2a 100644 --- a/spec/fixtures/cassettes/braintree/token.yml +++ b/spec/fixtures/cassettes/braintree/token.yml @@ -29,7 +29,7 @@ http_interactions: message: Created headers: Date: - - Fri, 02 Sep 2016 22:11:12 GMT + - Fri, 02 Sep 2016 22:36:39 GMT Content-Type: - application/xml; charset=utf-8 Transfer-Encoding: @@ -50,44 +50,44 @@ http_interactions: Content-Encoding: - gzip Etag: - - W/"6ff04291f2858d2ed634b0547b758c62" + - W/"a661b1df8f38f1c21497066d7437316c" Cache-Control: - max-age=0, private, must-revalidate X-Request-Id: - - f2d9bac0-5dea-4f1e-bec4-f7cbe94a4cf2 + - 2b984fd3-c8cb-42de-8e0c-1a4b1e850a2c X-Runtime: - - '0.134842' + - '0.086035' Strict-Transport-Security: - max-age=31536000; includeSubDomains body: encoding: ASCII-8BIT string: !binary |- - H4sIAAD5yVcAA6RV246bSBB9z1eM5j0bLkM2SDOJYnvAIAMxxg3db9DtCZdu - sILN7etTjZO5SN4o0j4gJKiuOnXOqer7L4PgN93hR1s09cOt+o9ye3OoacOK - +vvD7T6y3n+6/fL53T3lxaE+vT811aH+/O7m5r5L+fnw+TC6GkncKY3Ns1M2 - 42bp5iwJm0x3jwdhKfJ7KPiZaGika/eY1dsiKBzVsx/vAtvRg4gV3iovyAob - ZGUJHNEhWD2quKQDjhD3p23vxY4RrL5PWAsLf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Qy2QQwz3Xhqf507cRtwqP3Jo2NJZrGplS + 67u3QplG4InF5urnq798nSOtSJPOIAfMt1BucSCv+/6sPSEPnnvi3kWOum+d + js9Aw4qATv6UWbpX7bXwt/nQfLEYfBFPG7a1YYaMVnjOMHIN+jPyf7S/xt3w + L8wEKRLkmGJmd8BBR6Pu5RzzJPCMjc2r+j/7Bz2b1BJLjR14NHhFJHAFfbEj + V84ZfH4WX+x2p4ghkNMn/S/+b8xcyxSD3WJLXVfAd8Crdxt+mX+ozZTbcLSH + eXjV7x7DOV1Llrq3NHIH6L//6b2g1/MDu9i7HFMlXvM/3PLGq/mcUtgjgMXY + Rte9AHlP4NtGaD0VNnkF/Spsb2PcbpBTsi3oI8kunPnOdQ/K86jdnoD//Ybp + PIrB3GDN1a/d9oz99n7T3mFQx2zH/hBTV02nHeyyDeicr6sm51aYiYXea5oD + 0HXs+4qfV3KeonD0NiHB6GmYG9DWLg573MJ9o/sje2P0+2+4NIdJBLs0XuqY + X99mdslieqaVnyW6hgL9KwyamYDxYqyUbDVObpGOe04P3JUvXrCCfC2bXCg5 + 0HG/mRng13dRxtWIIQMdJktpOk+bx8eHd9f7983Du99v5h8AAAD//wMAwcP3 + 59AHAAA= http_version: - recorded_at: Fri, 02 Sep 2016 22:11:51 GMT + recorded_at: Fri, 02 Sep 2016 22:36:39 GMT recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/cassettes/braintree/void.yml b/spec/fixtures/cassettes/braintree/void.yml index df044e442fe..1f7c4dab514 100644 --- a/spec/fixtures/cassettes/braintree/void.yml +++ b/spec/fixtures/cassettes/braintree/void.yml @@ -8,7 +8,7 @@ http_interactions: string: | - 1 + 40 fake-paypal-future-nonce sale @@ -31,7 +31,7 @@ http_interactions: message: Created headers: Date: - - Fri, 02 Sep 2016 22:11:12 GMT + - Fri, 02 Sep 2016 22:36:09 GMT Content-Type: - application/xml; charset=utf-8 Transfer-Encoding: @@ -52,56 +52,56 @@ http_interactions: Content-Encoding: - gzip Etag: - - W/"cb248351f7018347db27551faac8a928" + - W/"11a1c3503b84cf6d9c6b7689b686e463" Cache-Control: - max-age=0, private, must-revalidate X-Request-Id: - - fe02fb5c-7c8e-4569-8957-26b983914c96 + - 83c3cb13-7fd3-4646-aada-0f0343c5e792 X-Runtime: - - '0.339175' + - '0.349462' Strict-Transport-Security: - max-age=31536000; includeSubDomains body: encoding: ASCII-8BIT string: !binary |- - H4sIAAD5yVcAA+xYTW/jNhC951cEvjOyHcebXSjKZpF0kSKHRXdzaC8BJY4s - NhSpkpRj76/vUF+WIirxoSh6KJBDNPM4HM4MZx4dXu9ycboFbbiSV7PF2Xx2 - CjJRjMvN1ezxxy/kcnYdnYRWU2loYhEVnZyehpxF7OdP+pJqGQb44WTGUlua - iJY2U5r/BBYGjchp7b6AyFABYVD962RJqTXutifcKIKbQvT4/TYMxmIHprkq - pY3QxXkYNB9OnoNOMiotoUnihATdMRbyWAkbBj5t5WwZE4/uVHJxNbO6hFlQ - W6doSx8FVZoh0qNINFALjFB76o5+NWP4aXkOs2g5X6zJ/COZL38sl58WC/z7 - AwPQLajWlwU7fv0S1x8WNGE2VuEJ3EeVu9ceojDl2lgiaQ4epaDTukTlBZV7 - jwZyyoVH/gKx4dZnq8iU9MlTuhsFNeifKoy5EFiy//IJjdUAWBOMaTDGF4Kd - BclcJiYhQiVUcOszr2GD980XJ4UXS1RXw+svFqjeTx+nVrvVhIoio8ujUOfv - oWSJ2eDJOFO95OCZ0lIy3y3pNKapcqo13Q+UGMheI/IZKai2HENjwFoBOeBN - Ha7wGT90rPfM98zG1CaZF5Pxovi/Fv+jtdjPTtMYScpBMNPUwtYQ0FppgjEq - lDTgPVqF6x19iI7ucUK9CWhNDLPmt/ImpjrGdjteORY66Abnwgvdo+ZPqKsc - R40ZJzYstEpwN4xDeztoBfcG4wAe7riYu1k9pZ1YabFQo5sCNVtHIaYQVQQZ - 484rjPEYNvJyq3ji8pBifnEFlkgMenyW0k163KUe5xMoS3ek5iBeFewgL9pp - HSslg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KkALFH2JNRGBZV8lupFnpVy8x7k + lmslHebWUMkStUO62m/RNjANJUVW+NgsdBXXCBp1DlTYHE8OB8RA1oAYJNwe + 9M1nq6o05g3LblMJR8oGqNeavsU7tolT7AAdyNpD071WYoDoBG0YjamwyeGQ + ks8HzEg6bpoqI05LZQrDXafKLmaKVWlNpgdh62UNqJL8ewXtDUIxZoFjq51c + Jnc1QRaKGPY8c2V6fUv9xlemfXqQnGMJ6v1owvfTsUYAGmoT4+4ZUmhUFOWR + tLrH9xZ++OapEXPPliZCBulrX9kfuleLq20k8aZj7O6oA15iFLYoiGnJ8UhT + eeNw8NrjXtJGqWl2gvp5TpWYVPNylgcN9H1zqkkeKXHuKkaQahAXT28bGyHx + WNp6sXjkV/u4jk+wuXtIHOOmrlevDhorqmtWM91n7v2BzWJ6trFRJEju3Yp+ + zZRwr2+aPj4mJUytYs63bkplAHPzxW2rXkiTzYkWw5BU2jQclYHFJ5jpOtFI + 5c/NgOD6tx9jJk/1I+GwcwHANqz9x3BkHysVaZnPYJWmHv6KGZnx3XleVhZ8 + pdGOEMIl0qyqeTC4/ydQXlLx1D73o2AONyYxA1/HXGfIY2ZBb9uqmc9btnp6 + ZHPsKgRvmCs9wKNnyvNgcn6+QTwQhB28fs/H9e8PsMM2KKDpVEN1v6CJFot/ + +fgbyVY0BThPLpbZ9ZKt01XI6PJ8tR6EtRsaY7aJ4q8fv9yTdHkVXp0vQ2Br + 9u56/Q476WvcP8UfmoAcTx9w1lcbd4C7+0+Pnwm7ughhuU5hla1rItAoD3EE + Mve/yPA1MpuEJqL3vz493JHz9XVG311dXiRLoOuQdZkY7afJ4bEZ/6xy2aEG + 4iG6f33Gdwo67EHY3WkhUIx1aNtnRDv27r88fH749OUeW/ccpKOCpa2L0ufq + 7J8ErybhfJf0AI/pVV1P99DXKOiuymjqxid/AQAA//8DALtkqRVEFQAA http_version: - recorded_at: Fri, 02 Sep 2016 22:11:50 GMT + recorded_at: Fri, 02 Sep 2016 22:36:09 GMT - request: method: put - uri: https://api.sandbox.braintreegateway.com/merchants/7rdg92j7bm7fk5h3/transactions/dzzawfrn/void + uri: https://api.sandbox.braintreegateway.com/merchants/7rdg92j7bm7fk5h3/transactions/2y7qg1r8/void body: encoding: UTF-8 string: '' @@ -124,7 +124,7 @@ http_interactions: message: OK headers: Date: - - Fri, 02 Sep 2016 22:11:12 GMT + - Fri, 02 Sep 2016 22:36:09 GMT Content-Type: - application/xml; charset=utf-8 Transfer-Encoding: @@ -145,52 +145,52 @@ http_interactions: Content-Encoding: - gzip Etag: - - W/"21286df229a3b38126ae34970f669f91" + - W/"f133fdd9724b142eb9c87d4f59f67117" Cache-Control: - max-age=0, private, must-revalidate X-Request-Id: - - bef59749-bab9-4e4d-8385-24991a5b2946 + - b356b1ff-7bc6-4612-af21-4c0d2e561883 X-Runtime: - - '0.161856' + - '0.207812' Strict-Transport-Security: - max-age=31536000; includeSubDomains body: encoding: ASCII-8BIT string: !binary |- - H4sIAAD5yVcAA+xYS3PbNhC+51dodIcpyYriZGg6ydjNuONDpokP7cUDEksR - NQiwAChL/vVd8CXSBGMd2k4OnfHB2v3w2PcHhlf7XMx2oA1X8nK+PFvMZyAT - xbjcXs7vv/9CLuZX0ZvQaioNTSyiojezWchZxJ6f6VOqZRjgDyczltrSRDvF - GbAwaH46jT0UEBkqIAyqf50sKbXGkw6EG0XwQIjuv12HwVjswDRXpbQRXm8R - Bs0PJ89BJxmVltAkcUKCVzEW8lgJGwY+bXXRMiYe3UxycTm3uoR5UO9OcS99 - ElRphkiPItFALTBC7cyZfjln+NPyHObRarHckMV7slh9X60+LJf49wc6oFtQ - rS8Ldvr6Fa4/LmjcbKxCC9yPKm4vb4jClGtjiaQ5eJSCTusSlRdUHjwayCkX - HvkTxIZb315FpqRPntL9yKlB36ow5kJguv7HFhqrATAnGNNgjM8FewuSuUhM - QoRKqODWt72GLdaaz08KC0tUpeG9LyaoPkybU6vdakJFkdHVSajz11CyxGjw - ZBypXnDQprSUzFclncY0WU61poeBE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BrNzXHdBvF + X24+35F0eRleni5DYGt2frU+x076EvdPEajGIW/nT0h2qo27wO3dx4dPhF2e + hbBcp7DK1jUTapQHPwKZ+zA0fI7NBqHx6N2vj/e35HR9ldHzy4uzZAl0HbIu + EqPzNDm8tuOfVS471EA8RPfP7/hWQYc9CLuaFgLFmIe2fUe1Y+/u8/2n+4+f + 77B1z0E6LlzaOil9ps5+JXkxCee7pAf4ll7V9XQPf4+CrlRGUzc++gsAAP// + AwDQp4KAQRYAAA== http_version: - recorded_at: Fri, 02 Sep 2016 22:11:50 GMT + recorded_at: Fri, 02 Sep 2016 22:36:09 GMT recorded_with: VCR 3.0.3 diff --git a/spec/models/solidus_paypal_braintree/gateway_spec.rb b/spec/models/solidus_paypal_braintree/gateway_spec.rb index 19cec79cc32..3259e4cd421 100644 --- a/spec/models/solidus_paypal_braintree/gateway_spec.rb +++ b/spec/models/solidus_paypal_braintree/gateway_spec.rb @@ -3,27 +3,14 @@ require 'support/order_ready_for_payment' RSpec.describe SolidusPaypalBraintree::Gateway do - let(:source) do - SolidusPaypalBraintree::Source.new( - nonce: 'fake-paypal-future-nonce' - ) - end - let(:gateway) do described_class.new end - cassette_options = { cassette_name: "braintree/purchase" } - describe '#purchase', vcr: cassette_options do - subject(:purchase) { gateway.purchase(10.00, source, {}) } - - it 'returns a successful billing response', aggregate_failures: true do - expect(purchase).to be_a ActiveMerchant::Billing::Response - expect(purchase).to be_success - expect(purchase).to be_test - expect(purchase.message).to eq 'settling' - expect(purchase.authorization).to be_present - end + let(:source) do + SolidusPaypalBraintree::Source.new( + nonce: 'fake-paypal-future-nonce' + ) end cassette_options = { cassette_name: "braintree/payment" } @@ -53,37 +40,76 @@ end end - cassette_options = { cassette_name: "braintree/authorize" } - describe "#authorize", vcr: cassette_options do - subject(:authorize) do - gateway.authorize(10.00, source, {}) + describe "instance methods" do + let(:authorized_id) do + Braintree::Transaction.sale( + amount: 40, + payment_method_nonce: source.nonce + ).transaction.id end - it "returns a successful billing response", aggregate_failures: true do - expect(authorize).to be_a ActiveMerchant::Billing::Response - expect(authorize).to be_success - expect(authorize).to be_test - expect(authorize.message).to eq "authorized" + let(:sale_id) do + Braintree::Transaction.sale( + amount: 40, + payment_method_nonce: source.nonce, + options: { + submit_for_settlement: true + } + ).transaction.id end - end - cassette_options = { cassette_name: "braintree/void" } - describe "#void", vcr: cassette_options do - subject(:void) { gateway.void(response_code, source, {}) } + let(:settled_id) do + Braintree::TestTransaction.settle(sale_id).transaction.id + end - let(:response_code) do - result = Braintree::Transaction.sale( - amount: 1, - payment_method_nonce: source.nonce - ) - result.transaction.id + cassette_options = { cassette_name: "braintree/purchase" } + describe '#purchase', vcr: cassette_options do + subject(:purchase) { gateway.purchase(10.00, source, {}) } + + it 'returns a successful billing response', aggregate_failures: true do + expect(purchase).to be_a ActiveMerchant::Billing::Response + expect(purchase).to be_success + expect(purchase).to be_test + expect(purchase.message).to eq 'settling' + expect(purchase.authorization).to be_present + end + end + + cassette_options = { cassette_name: "braintree/authorize" } + describe "#authorize", vcr: cassette_options do + subject(:authorize) { gateway.authorize(10.00, source, {}) } + + it 'returns a successful billing response', aggregate_failures: true do + expect(authorize).to be_a ActiveMerchant::Billing::Response + expect(authorize).to be_success + expect(authorize).to be_test + expect(authorize.message).to eq 'authorized' + expect(authorize.authorization).to be_present + end end - it 'returns a successful billing response', aggregate_failures: true do - expect(void).to be_a ActiveMerchant::Billing::Response - expect(void).to be_success - expect(void).to be_test - expect(void.message).to eq 'voided' + cassette_options = { cassette_name: "braintree/credit" } + describe "#credit", vcr: cassette_options do + subject(:credit) { gateway.credit(20, source, settled_id, {}) } + + it 'returns a successful billing response', aggregate_failures: true do + expect(credit).to be_a ActiveMerchant::Billing::Response + expect(credit).to be_success + expect(credit).to be_test + expect(credit.message).to eq 'settling' + end + end + + cassette_options = { cassette_name: "braintree/void" } + describe "#void", vcr: cassette_options do + subject(:void) { gateway.void(authorized_id, source, {}) } + + it 'returns a successful billing response', aggregate_failures: true do + expect(void).to be_a ActiveMerchant::Billing::Response + expect(void).to be_success + expect(void).to be_test + expect(void.message).to eq 'voided' + end end end