Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional fields to request for 3d secure 2 #22

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ public static function buildWirecardButtonHtml($params, $payment, $order, $initU
'orderDescription' => $order->firstname . ' ' . $order->lastname . ' (' . $order->zip . '), '.$payment->trlKwf('Order: {0}', $order->number),
'firstname' => $order->firstname,
'lastname' => $order->lastname,
'email' => $order->email,
'city' => $order->city,
'country' => $order->country,
'street1' => $order->street,
'postal-code' => $order->zip,
'displayText' => $payment->trlKwf('Thank you very much for your order.'),
'successRedirectUrl' => $payment->getChildComponent('_success')->getAbsoluteUrl(),
'failRedirectUrl' => $payment->getChildComponent('_failure')->getAbsoluteUrl(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,22 @@ public function jsonInitiatePaymentAction()
$client->setAuth($wirecardUsername, $wirecardPassword, \Zend_Http_Client::AUTH_BASIC);
$postData = array(
'payment' => array_merge(array(
'card' => array(
'merchant-tokenization-flag' => true,
),
'merchant-account-id' => array(
'value' => $wirecardMerchantId
),
'account-holder' => array(
'first-name' => $this->getParam('firstname'),
'last-name' => $this->getParam('lastname'),
'email' => $this->getParam('email'),
'address' => array(
'street1' => $this->getParam('street1'),
'postal-code' => $this->getParam('zip'),
'city' => $this->getParam('city'),
'country' => $this->getParam('country'),
)
),
'locale' => $this->getParam('language'),
'request-id' => $this->getParam('orderId'),
Expand Down
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@
Shop Component for Koala Framework

#### Wirecard credentials
Several types of payment methods can be configured. Each payment method has its own individual test credentials, which need to be set correctly for each payment method to work properly in a test environment. Some payment methods are shown below but other configurations can be found at: https://doc.wirecard.com/PPv2.html#PPv2_PaymentMethods
Several types of payment methods can be configured. Each payment method has its own individual test credentials, which need to be set correctly for each payment method to work properly in a test environment. Some payment methods are shown below but other configurations can be found at: https://doc.wirecard.com/CC_Main.html#PPv2_CC_3DSecure
```
[test]
;creditcard
wirecard.url = https://wpp-test.wirecard.com/api/payment/register
wirecard.merchant.id = 7a6dd74f-06ab-4f3f-a864-adc52687270a
wirecard.secret = a8c3fce6-8df7-4fd6-a1fd-62fa229c5e55
wirecard.auth.username = "70000-APIDEMO-CARD"
wirecard.auth.password = "ohysS0-dvfMx"

;creditcard with 3d-secure enabled
wirecard.url = https://wpp-test.wirecard.com/api/payment/register
wirecard.merchant.id = cad16b4a-abf2-450d-bcb8-1725a4cef443
Expand Down