Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F79854299
PhortuneCartImplementation.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Aug 28, 15:07
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Aug 30, 15:07 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20246515
Attached To
rPH Phabricator
PhortuneCartImplementation.php
View Options
<?php
abstract
class
PhortuneCartImplementation
{
/**
* Load implementations for a given set of carts.
*
* Note that this method should return a map using the original keys to
* identify which implementation corresponds to which cart.
*/
abstract
public
function
loadImplementationsForCarts
(
PhabricatorUser
$viewer
,
array
$carts
);
abstract
public
function
getName
(
PhortuneCart
$cart
);
abstract
public
function
getCancelURI
(
PhortuneCart
$cart
);
abstract
public
function
getDoneURI
(
PhortuneCart
$cart
);
public
function
assertCanCancelOrder
(
PhortuneCart
$cart
)
{
switch
(
$cart
->
getStatus
())
{
case
PhortuneCart
::
STATUS_PURCHASED
:
throw
new
Exception
(
pht
(
'This order can not be cancelled because it has already been '
.
'completed.'
));
break
;
}
}
public
function
assertCanRefundOrder
(
PhortuneCart
$cart
)
{
return
;
}
abstract
public
function
willCreateCart
(
PhabricatorUser
$viewer
,
PhortuneCart
$cart
);
}
Event Timeline
Log In to Comment