Skip to content

Commit 0b52dfb

Browse files
committed
Updated CCNow PDT status code
1 parent a3ed108 commit 0b52dfb

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,4 +229,6 @@ public function handleIpn(Request $request, $proc){
229229
}
230230
}
231231
}
232-
```
232+
```
233+
234+
**It is important to remember that IPN notifications are generally delivered via POST. So, you should add post method and remove csrf check for any route handling ipn notifications.**

src/Services/CCNow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function pdt(array $input){
106106
$subscr_id = array_get($input, 'order_id');
107107
$payment_amount = array_get($input, 'amount');
108108

109-
return new TransactionResult($item_number, $subscr_id, $payment_amount, 'Pass', 'signup', $input);
109+
return new TransactionResult($item_number, $subscr_id, $payment_amount, 'signup', 'signup', $input);
110110
}
111111

112112
/**

src/Services/Paypal.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,12 @@ public function pdt(array $input){
123123
throw new TransactionException('Invalid Paypal Auth Token');
124124
}
125125

126-
$req .= "&tx=$tx_token&at=$auth_token";
126+
$req .= "&tx=$tx_token&at=$auth_token";
127127

128128
$header = "POST /cgi-bin/webscr HTTP/1.0\r\n";
129129
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
130130
$header .= "Content-Length: ".strlen ($req)."\r\n\r\n";
131131
$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
132-
133132

134133
if (!$fp) {
135134
throw new TransactionException('Cannot Connect to Paypal');

0 commit comments

Comments
 (0)