Skip to content

Commit b86b691

Browse files
committed
feat: added user_action option
1 parent 16bbfd9 commit b86b691

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Message/RestPurchaseRequest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,15 @@ class RestPurchaseRequest extends RestAuthorizeRequest
227227
const SHIPPING_PREFERENCE_GET_FROM_FILE = 'GET_FROM_FILE';
228228
const SHIPPING_PREFERENCE_SET_PROVIDED_ADDRESS= 'SET_PROVIDED_ADDRESS';
229229

230+
const USER_ACTION_COMMIT = 'COMMIT';
231+
const USER_ACTION_CONTINUE= 'CONTINUE';
232+
230233
public function getData()
231234
{
232235
$data = parent::getData();
233236
$data['intent'] = 'sale';
234237
$data['application_context']['shipping_preference'] = $this->getShippingPreference();
238+
$data['application_context']['user_action'] = $this->getUserAction();
235239
return $data;
236240
}
237241

@@ -240,6 +244,11 @@ public function getShippingPreference()
240244
return $this->getParameter('shippingPreference');
241245
}
242246

247+
public function getUserAction()
248+
{
249+
return $this->getParameter('userAction');
250+
}
251+
243252
/**
244253
* Set the shipping preference
245254
*
@@ -260,4 +269,9 @@ public function setShippingPreference($value)
260269
{
261270
return $this->setParameter('shippingPreference', $value);
262271
}
272+
273+
public function setUserAction($value)
274+
{
275+
return $this->setParameter('userAction', $value);
276+
}
263277
}

0 commit comments

Comments
 (0)