forked from instride-ch/omnipay-datatrans
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check PayPal pending flag and set isPending() appropriaely.
- Loading branch information
Showing
3 changed files
with
102 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,61 @@ public function setUp() | |
"uppMsgType" => "web", | ||
] | ||
); | ||
|
||
$this->responsePendingPayPal = new CompleteResponse( | ||
$this->getMockRequest(), | ||
[ | ||
"uppCustomerEmail"=> "[email protected]", | ||
"testOnly"=> "yes", | ||
"amount"=> "2250", | ||
"pmethod"=> "PAP", | ||
"itemamt"=> "2250", | ||
"uppWebResponseMethod"=> "POST", | ||
"sign2"=> "d878c372972f03c8947af261ea9522e99ac5bb48c1a079cb4a84ec16a987fa4d", | ||
"uppCustomerName"=> "Jason Judge", | ||
"sign"=> "7b59c12fa3dd680771b2cd8cdc4eb394cf12f2f4a39a8e8d7e5dde0e295670b7", | ||
"uppCustomerCountry"=> "DEU", | ||
"uppCustomerCity"=> "Freiburg", | ||
"taxamt1"=> "0", | ||
"uppCustomerZipCode"=> "79111", | ||
"taxamt0"=> "0", | ||
"payPalAllowNote"=> "1", | ||
"refno"=> "382583328377", | ||
"uppReturnMaskedCc"=> "yes", | ||
"uppCustomerDetails"=> "return", | ||
"language"=> "en", | ||
"uppDisplayShippingDetails"=> "yes", | ||
"reqtype"=> "CAA", | ||
"acqAuthorizationCode"=> "8Y894304WN001691G", | ||
"uppCustomerStreet"=> "ESpachstr. 1", | ||
"taxamt"=> "0", | ||
"name1"=> "Item2", | ||
"theme"=> "DT2015", | ||
"name0"=> "Item1", | ||
"number1"=> "2", | ||
"number0"=> "1", | ||
"pendingPayPal"=> "yes", | ||
"responseMessage"=> "PayPal transaction successful/pending", | ||
"uppTransactionId"=> "181203004654632546", | ||
"uppForwardCustomerDetails"=> "yes", | ||
"responseCode"=> "01", | ||
"merchantId"=> "1100016183", | ||
"redirectMethod"=> "GET", | ||
"currency"=> "GBP", | ||
"amt1"=> "250", | ||
"amt0"=> "1000", | ||
"version"=> "1.0.2", | ||
"authorizationCode"=> "719912597", | ||
"shippingamt"=> "0", | ||
"qty1"=> "1", | ||
"desc1"=> "This is Item Two", | ||
"uppTermsLink"=> "https://academe.co.uk/", | ||
"qty0"=> "2", | ||
"desc0"=> "This is Item One", | ||
"status" => "success", | ||
"uppMsgType"=> "web", | ||
] | ||
); | ||
} | ||
|
||
public function testSuccess() | ||
|
@@ -89,4 +144,11 @@ public function testCancelled() | |
$this->assertFalse($this->responseCancel->isSuccessful()); | ||
$this->assertTrue($this->responseCancel->isCancelled()); | ||
} | ||
|
||
public function testPendingPayal() | ||
{ | ||
$this->assertTrue($this->responsePendingPayPal->isSuccessful()); | ||
$this->assertFalse($this->responsePendingPayPal->isCancelled()); | ||
$this->assertTrue($this->responsePendingPayPal->isPending()); | ||
} | ||
} |