diff --git a/README.md b/README.md index 2852926..7c172b0 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ For general usage instructions, please see the main ## Order description -We currently set the order description to "Donation" by default. +We currently set the order description to "Merchandise" by default. To set another one, use `PurchaseRequest::setDescription()`. diff --git a/src/Omnipay/WorldpayCGHosted/Message/PurchaseRequest.php b/src/Omnipay/WorldpayCGHosted/Message/PurchaseRequest.php index d3b4193..d393134 100755 --- a/src/Omnipay/WorldpayCGHosted/Message/PurchaseRequest.php +++ b/src/Omnipay/WorldpayCGHosted/Message/PurchaseRequest.php @@ -225,7 +225,7 @@ public function getData() $order->addAttribute('orderCode', $this->getTransactionId()); $order->addAttribute('installationId', $this->getInstallation()); - $description = $this->getDescription() ? $this->getDescription() : 'Donation'; + $description = $this->getDescription() ? $this->getDescription() : 'Merchandise'; $order->addChild('description', $description); $amount = $order->addChild('amount'); diff --git a/tests/Omnipay/WorldpayCGHosted/GatewayTest.php b/tests/Omnipay/WorldpayCGHosted/GatewayTest.php index a275fd4..1173b2f 100755 --- a/tests/Omnipay/WorldpayCGHosted/GatewayTest.php +++ b/tests/Omnipay/WorldpayCGHosted/GatewayTest.php @@ -110,7 +110,7 @@ public function testPurchaseRequestDataSetUp() $this->assertEquals('ACMECO', $data->attributes()['merchantCode']); $this->assertEquals($this->parameters['transactionId'], $order->attributes()['orderCode']); $this->assertEquals('ABC123', $order->attributes()['installationId']); - $this->assertEquals('Donation', $order->description); + $this->assertEquals('Merchandise', $order->description); $this->assertEquals('745', $order->amount->attributes()['value']); $this->assertEquals('GBP', $order->amount->attributes()['currencyCode']); $this->assertEquals('2', $order->amount->attributes()['exponent']); diff --git a/tests/Omnipay/WorldpayCGHosted/Message/PurchaseRequestTest.php b/tests/Omnipay/WorldpayCGHosted/Message/PurchaseRequestTest.php index d6a1336..fbb17bb 100644 --- a/tests/Omnipay/WorldpayCGHosted/Message/PurchaseRequestTest.php +++ b/tests/Omnipay/WorldpayCGHosted/Message/PurchaseRequestTest.php @@ -35,7 +35,7 @@ public function testAmountDetails() public function testDefaultDescription() { $data = $this->purchase->getData(); - $this->assertEquals('Donation', $data->submit->order->description); + $this->assertEquals('Merchandise', $data->submit->order->description); } public function testPaymentMethodMaskWithKnownOmnipayType()