Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f8ef1ee

Browse files
Added complete purchase and purchase response
1 parent 3d605fd commit f8ef1ee

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
/**
3+
* @link https://github.com/phpviet/omnipay-onepay
4+
*
5+
* @copyright (c) PHP Viet
6+
* @license [MIT](https://opensource.org/licenses/MIT)
7+
*/
8+
9+
namespace Omnipay\OnePay\Message;
10+
11+
/**
12+
* @author Vuong Minh <vuongxuongminh@gmail.com>
13+
* @since 1.0.0
14+
*/
15+
class CompletePurchaseResponse extends AbstractSignatureResponse
16+
{
17+
18+
}

‎src/Message/PurchaseResponse.php‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?php
2+
/**
3+
* @link https://github.com/phpviet/omnipay-onepay
4+
*
5+
* @copyright (c) PHP Viet
6+
* @license [MIT](https://opensource.org/licenses/MIT)
7+
*/
8+
9+
namespace Omnipay\OnePay\Message;
10+
11+
use Omnipay\Common\Message\RedirectResponseInterface;
12+
13+
/**
14+
* @author Vuong Minh <vuongxuongminh@gmail.com>
15+
* @since 1.0.0
16+
*/
17+
class PurchaseResponse extends AbstractResponse implements RedirectResponseInterface
18+
{
19+
/**
20+
* {@inheritdoc}
21+
*/
22+
public function isSuccessful(): bool
23+
{
24+
return false;
25+
}
26+
27+
/**
28+
* {@inheritdoc}
29+
*/
30+
public function getRedirectUrl(): string
31+
{
32+
return $this->data['redirect_url'];
33+
}
34+
35+
/**
36+
* {@inheritdoc}
37+
*/
38+
public function isRedirect(): bool
39+
{
40+
return true;
41+
}
42+
43+
/**
44+
* {@inheritdoc}
45+
*/
46+
public function getTransactionId(): string
47+
{
48+
return $this->data['vpc_MerchTxnRef'];
49+
}
50+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /